{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "afbd9f0c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import xlrd"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "295f772f",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 导入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "8e4bef40",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>班级</th>\n",
       "      <th>性别</th>\n",
       "      <th>男1000米跑</th>\n",
       "      <th>男50米跑</th>\n",
       "      <th>男跳远</th>\n",
       "      <th>男体前屈</th>\n",
       "      <th>男引体</th>\n",
       "      <th>男肺活量</th>\n",
       "      <th>身高</th>\n",
       "      <th>体重</th>\n",
       "      <th>BMI</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4'13</td>\n",
       "      <td>8.88</td>\n",
       "      <td>195.0</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>2785</td>\n",
       "      <td>170.0</td>\n",
       "      <td>72.6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4'16</td>\n",
       "      <td>7.70</td>\n",
       "      <td>225.0</td>\n",
       "      <td>11</td>\n",
       "      <td>7</td>\n",
       "      <td>3133</td>\n",
       "      <td>174.0</td>\n",
       "      <td>52.7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4'09</td>\n",
       "      <td>8.45</td>\n",
       "      <td>218.0</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "      <td>3901</td>\n",
       "      <td>169.0</td>\n",
       "      <td>46.5</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4'21</td>\n",
       "      <td>8.05</td>\n",
       "      <td>206.0</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>4946</td>\n",
       "      <td>183.0</td>\n",
       "      <td>79.7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>3'44</td>\n",
       "      <td>7.52</td>\n",
       "      <td>210.0</td>\n",
       "      <td>13</td>\n",
       "      <td>9</td>\n",
       "      <td>3538</td>\n",
       "      <td>171.0</td>\n",
       "      <td>54.7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>472</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>4'23</td>\n",
       "      <td>8.27</td>\n",
       "      <td>208.0</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>4647</td>\n",
       "      <td>176.0</td>\n",
       "      <td>69.5</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>473</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>5'19</td>\n",
       "      <td>9.55</td>\n",
       "      <td>210.0</td>\n",
       "      <td>15</td>\n",
       "      <td>6</td>\n",
       "      <td>7042</td>\n",
       "      <td>177.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>474</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>3'25</td>\n",
       "      <td>7.50</td>\n",
       "      <td>252.0</td>\n",
       "      <td>13</td>\n",
       "      <td>13</td>\n",
       "      <td>5755</td>\n",
       "      <td>181.0</td>\n",
       "      <td>65.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>475</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>4'39</td>\n",
       "      <td>7.81</td>\n",
       "      <td>208.0</td>\n",
       "      <td>14</td>\n",
       "      <td>11</td>\n",
       "      <td>5688</td>\n",
       "      <td>172.0</td>\n",
       "      <td>51.7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>477 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     班级 性别 男1000米跑  男50米跑    男跳远  男体前屈  男引体  男肺活量     身高    体重  BMI\n",
       "0     1  男    4'13   8.88  195.0    12    1  2785  170.0  72.6    0\n",
       "1     1  男    4'16   7.70  225.0    11    7  3133  174.0  52.7    0\n",
       "2     1  男    4'09   8.45  218.0    14    1  3901  169.0  46.5    0\n",
       "3     1  男    4'21   8.05  206.0    13    1  4946  183.0  79.7    0\n",
       "4     1  男    3'44   7.52  210.0    13    9  3538  171.0  54.7    0\n",
       "..   .. ..     ...    ...    ...   ...  ...   ...    ...   ...  ...\n",
       "472  17  男    4'23   8.27  208.0    10    0  4647  176.0  69.5    0\n",
       "473  17  男    5'19   9.55  210.0    15    6  7042  177.0  76.0    0\n",
       "474  17  男    3'25   7.50  252.0    13   13  5755  181.0  65.0    0\n",
       "475  17  男    4'39   7.81  208.0    14   11  5688  172.0  51.7    0\n",
       "476  17  男       0   0.00    0.0     0    0     0    0.0   0.0    0\n",
       "\n",
       "[477 rows x 11 columns]"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "male = pd.read_excel(r'C:\\Users\\Mr.Xiao\\Desktop\\模块四作业数据\\18级高一体测成绩汇总.xls',sheet_name = 0,header=0, index_col=False)\n",
    "male"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "id": "87cf94b7",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>班级</th>\n",
       "      <th>性别</th>\n",
       "      <th>女800米跑</th>\n",
       "      <th>女50米跑</th>\n",
       "      <th>女跳远</th>\n",
       "      <th>女体前屈</th>\n",
       "      <th>女仰卧</th>\n",
       "      <th>女肺活量</th>\n",
       "      <th>身高</th>\n",
       "      <th>体重</th>\n",
       "      <th>BMI</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>女</td>\n",
       "      <td>3.22</td>\n",
       "      <td>9.32</td>\n",
       "      <td>185.0</td>\n",
       "      <td>16</td>\n",
       "      <td>48</td>\n",
       "      <td>3775</td>\n",
       "      <td>163.0</td>\n",
       "      <td>51.3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>女</td>\n",
       "      <td>4.59</td>\n",
       "      <td>11.44</td>\n",
       "      <td>148.0</td>\n",
       "      <td>9</td>\n",
       "      <td>29</td>\n",
       "      <td>3683</td>\n",
       "      <td>163.0</td>\n",
       "      <td>66.6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>女</td>\n",
       "      <td>3.46</td>\n",
       "      <td>13.40</td>\n",
       "      <td>150.0</td>\n",
       "      <td>7</td>\n",
       "      <td>40</td>\n",
       "      <td>3331</td>\n",
       "      <td>157.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>女</td>\n",
       "      <td>3.39</td>\n",
       "      <td>9.52</td>\n",
       "      <td>172.0</td>\n",
       "      <td>21</td>\n",
       "      <td>46</td>\n",
       "      <td>3701</td>\n",
       "      <td>160.0</td>\n",
       "      <td>50.7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>女</td>\n",
       "      <td>3.43</td>\n",
       "      <td>9.79</td>\n",
       "      <td>145.0</td>\n",
       "      <td>8</td>\n",
       "      <td>34</td>\n",
       "      <td>3592</td>\n",
       "      <td>167.0</td>\n",
       "      <td>63.9</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>588</th>\n",
       "      <td>17</td>\n",
       "      <td>女</td>\n",
       "      <td>3.51</td>\n",
       "      <td>9.60</td>\n",
       "      <td>150.0</td>\n",
       "      <td>24</td>\n",
       "      <td>41</td>\n",
       "      <td>2255</td>\n",
       "      <td>158.0</td>\n",
       "      <td>49.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>589</th>\n",
       "      <td>17</td>\n",
       "      <td>女</td>\n",
       "      <td>4.00</td>\n",
       "      <td>10.18</td>\n",
       "      <td>150.0</td>\n",
       "      <td>13</td>\n",
       "      <td>36</td>\n",
       "      <td>2937</td>\n",
       "      <td>161.0</td>\n",
       "      <td>55.7</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>590</th>\n",
       "      <td>17</td>\n",
       "      <td>女</td>\n",
       "      <td>3.45</td>\n",
       "      <td>10.18</td>\n",
       "      <td>152.0</td>\n",
       "      <td>15</td>\n",
       "      <td>35</td>\n",
       "      <td>2592</td>\n",
       "      <td>165.0</td>\n",
       "      <td>48.6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>591</th>\n",
       "      <td>17</td>\n",
       "      <td>女</td>\n",
       "      <td>4.01</td>\n",
       "      <td>9.67</td>\n",
       "      <td>165.0</td>\n",
       "      <td>10</td>\n",
       "      <td>41</td>\n",
       "      <td>1829</td>\n",
       "      <td>154.0</td>\n",
       "      <td>43.6</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>592</th>\n",
       "      <td>17</td>\n",
       "      <td>女</td>\n",
       "      <td>4.48</td>\n",
       "      <td>9.09</td>\n",
       "      <td>180.0</td>\n",
       "      <td>10</td>\n",
       "      <td>46</td>\n",
       "      <td>2962</td>\n",
       "      <td>162.0</td>\n",
       "      <td>55.3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>593 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     班级 性别  女800米跑  女50米跑    女跳远  女体前屈  女仰卧  女肺活量     身高    体重  BMI\n",
       "0     1  女    3.22   9.32  185.0    16   48  3775  163.0  51.3    0\n",
       "1     1  女    4.59  11.44  148.0     9   29  3683  163.0  66.6    0\n",
       "2     1  女    3.46  13.40  150.0     7   40  3331  157.0  60.0    0\n",
       "3     1  女    3.39   9.52  172.0    21   46  3701  160.0  50.7    0\n",
       "4     1  女    3.43   9.79  145.0     8   34  3592  167.0  63.9    0\n",
       "..   .. ..     ...    ...    ...   ...  ...   ...    ...   ...  ...\n",
       "588  17  女    3.51   9.60  150.0    24   41  2255  158.0  49.0    0\n",
       "589  17  女    4.00  10.18  150.0    13   36  2937  161.0  55.7    0\n",
       "590  17  女    3.45  10.18  152.0    15   35  2592  165.0  48.6    0\n",
       "591  17  女    4.01   9.67  165.0    10   41  1829  154.0  43.6    0\n",
       "592  17  女    4.48   9.09  180.0    10   46  2962  162.0  55.3    0\n",
       "\n",
       "[593 rows x 11 columns]"
      ]
     },
     "execution_count": 250,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "female = pd.read_excel(r'C:\\Users\\Mr.Xiao\\Desktop\\模块四作业数据\\18级高一体测成绩汇总.xls',sheet_name = 1,header=0, index_col=False)\n",
    "female"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "df75af43",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">男肺活量</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女肺活量</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男50米跑</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女50米跑</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男体前屈</th>\n",
       "      <th>...</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女跳远</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男引体</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女仰卧</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男1000米跑</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女800米跑</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>...</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4540</td>\n",
       "      <td>100</td>\n",
       "      <td>3150</td>\n",
       "      <td>100</td>\n",
       "      <td>7.1</td>\n",
       "      <td>100</td>\n",
       "      <td>7.8</td>\n",
       "      <td>100</td>\n",
       "      <td>23.6</td>\n",
       "      <td>100</td>\n",
       "      <td>...</td>\n",
       "      <td>204</td>\n",
       "      <td>100</td>\n",
       "      <td>16.0</td>\n",
       "      <td>100</td>\n",
       "      <td>53</td>\n",
       "      <td>100</td>\n",
       "      <td>3'30\"</td>\n",
       "      <td>100</td>\n",
       "      <td>3'24\"</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4420</td>\n",
       "      <td>95</td>\n",
       "      <td>3100</td>\n",
       "      <td>95</td>\n",
       "      <td>7.2</td>\n",
       "      <td>95</td>\n",
       "      <td>7.9</td>\n",
       "      <td>95</td>\n",
       "      <td>21.5</td>\n",
       "      <td>95</td>\n",
       "      <td>...</td>\n",
       "      <td>198</td>\n",
       "      <td>95</td>\n",
       "      <td>15.0</td>\n",
       "      <td>95</td>\n",
       "      <td>51</td>\n",
       "      <td>95</td>\n",
       "      <td>3'35\"</td>\n",
       "      <td>95</td>\n",
       "      <td>3'30\"</td>\n",
       "      <td>95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4300</td>\n",
       "      <td>90</td>\n",
       "      <td>3050</td>\n",
       "      <td>90</td>\n",
       "      <td>7.3</td>\n",
       "      <td>90</td>\n",
       "      <td>8.0</td>\n",
       "      <td>90</td>\n",
       "      <td>19.4</td>\n",
       "      <td>90</td>\n",
       "      <td>...</td>\n",
       "      <td>192</td>\n",
       "      <td>90</td>\n",
       "      <td>14.0</td>\n",
       "      <td>90</td>\n",
       "      <td>49</td>\n",
       "      <td>90</td>\n",
       "      <td>3'40\"</td>\n",
       "      <td>90</td>\n",
       "      <td>3'36\"</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4050</td>\n",
       "      <td>85</td>\n",
       "      <td>2900</td>\n",
       "      <td>85</td>\n",
       "      <td>7.4</td>\n",
       "      <td>85</td>\n",
       "      <td>8.3</td>\n",
       "      <td>85</td>\n",
       "      <td>17.2</td>\n",
       "      <td>85</td>\n",
       "      <td>...</td>\n",
       "      <td>185</td>\n",
       "      <td>85</td>\n",
       "      <td>13.0</td>\n",
       "      <td>85</td>\n",
       "      <td>46</td>\n",
       "      <td>85</td>\n",
       "      <td>3'47\"</td>\n",
       "      <td>85</td>\n",
       "      <td>3'43\"</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3800</td>\n",
       "      <td>80</td>\n",
       "      <td>2750</td>\n",
       "      <td>80</td>\n",
       "      <td>7.5</td>\n",
       "      <td>80</td>\n",
       "      <td>8.6</td>\n",
       "      <td>80</td>\n",
       "      <td>15.0</td>\n",
       "      <td>80</td>\n",
       "      <td>...</td>\n",
       "      <td>178</td>\n",
       "      <td>80</td>\n",
       "      <td>12.0</td>\n",
       "      <td>80</td>\n",
       "      <td>43</td>\n",
       "      <td>80</td>\n",
       "      <td>3'55\"</td>\n",
       "      <td>80</td>\n",
       "      <td>3'50\"</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>3680</td>\n",
       "      <td>78</td>\n",
       "      <td>2650</td>\n",
       "      <td>78</td>\n",
       "      <td>7.7</td>\n",
       "      <td>78</td>\n",
       "      <td>8.8</td>\n",
       "      <td>78</td>\n",
       "      <td>13.6</td>\n",
       "      <td>78</td>\n",
       "      <td>...</td>\n",
       "      <td>175</td>\n",
       "      <td>78</td>\n",
       "      <td>NaN</td>\n",
       "      <td>78</td>\n",
       "      <td>41</td>\n",
       "      <td>78</td>\n",
       "      <td>4'00\"</td>\n",
       "      <td>78</td>\n",
       "      <td>3'55\"</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3560</td>\n",
       "      <td>76</td>\n",
       "      <td>2550</td>\n",
       "      <td>76</td>\n",
       "      <td>7.9</td>\n",
       "      <td>76</td>\n",
       "      <td>9.0</td>\n",
       "      <td>76</td>\n",
       "      <td>12.2</td>\n",
       "      <td>76</td>\n",
       "      <td>...</td>\n",
       "      <td>172</td>\n",
       "      <td>76</td>\n",
       "      <td>11.0</td>\n",
       "      <td>76</td>\n",
       "      <td>39</td>\n",
       "      <td>76</td>\n",
       "      <td>4'05\"</td>\n",
       "      <td>76</td>\n",
       "      <td>4'00\"</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3440</td>\n",
       "      <td>74</td>\n",
       "      <td>2450</td>\n",
       "      <td>74</td>\n",
       "      <td>8.1</td>\n",
       "      <td>74</td>\n",
       "      <td>9.2</td>\n",
       "      <td>74</td>\n",
       "      <td>10.8</td>\n",
       "      <td>74</td>\n",
       "      <td>...</td>\n",
       "      <td>169</td>\n",
       "      <td>74</td>\n",
       "      <td>NaN</td>\n",
       "      <td>74</td>\n",
       "      <td>37</td>\n",
       "      <td>74</td>\n",
       "      <td>4'10\"</td>\n",
       "      <td>74</td>\n",
       "      <td>4'05\"</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3320</td>\n",
       "      <td>72</td>\n",
       "      <td>2350</td>\n",
       "      <td>72</td>\n",
       "      <td>8.3</td>\n",
       "      <td>72</td>\n",
       "      <td>9.4</td>\n",
       "      <td>72</td>\n",
       "      <td>9.4</td>\n",
       "      <td>72</td>\n",
       "      <td>...</td>\n",
       "      <td>166</td>\n",
       "      <td>72</td>\n",
       "      <td>10.0</td>\n",
       "      <td>72</td>\n",
       "      <td>35</td>\n",
       "      <td>72</td>\n",
       "      <td>4'15\"</td>\n",
       "      <td>72</td>\n",
       "      <td>4'10\"</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>3200</td>\n",
       "      <td>70</td>\n",
       "      <td>2250</td>\n",
       "      <td>70</td>\n",
       "      <td>8.5</td>\n",
       "      <td>70</td>\n",
       "      <td>9.6</td>\n",
       "      <td>70</td>\n",
       "      <td>8.0</td>\n",
       "      <td>70</td>\n",
       "      <td>...</td>\n",
       "      <td>163</td>\n",
       "      <td>70</td>\n",
       "      <td>NaN</td>\n",
       "      <td>70</td>\n",
       "      <td>33</td>\n",
       "      <td>70</td>\n",
       "      <td>4'20\"</td>\n",
       "      <td>70</td>\n",
       "      <td>4'15\"</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>3080</td>\n",
       "      <td>68</td>\n",
       "      <td>2150</td>\n",
       "      <td>68</td>\n",
       "      <td>8.7</td>\n",
       "      <td>68</td>\n",
       "      <td>9.8</td>\n",
       "      <td>68</td>\n",
       "      <td>6.6</td>\n",
       "      <td>68</td>\n",
       "      <td>...</td>\n",
       "      <td>160</td>\n",
       "      <td>68</td>\n",
       "      <td>9.0</td>\n",
       "      <td>68</td>\n",
       "      <td>31</td>\n",
       "      <td>68</td>\n",
       "      <td>4'25\"</td>\n",
       "      <td>68</td>\n",
       "      <td>4'20\"</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2960</td>\n",
       "      <td>66</td>\n",
       "      <td>2050</td>\n",
       "      <td>66</td>\n",
       "      <td>8.9</td>\n",
       "      <td>66</td>\n",
       "      <td>10.0</td>\n",
       "      <td>66</td>\n",
       "      <td>5.2</td>\n",
       "      <td>66</td>\n",
       "      <td>...</td>\n",
       "      <td>157</td>\n",
       "      <td>66</td>\n",
       "      <td>NaN</td>\n",
       "      <td>66</td>\n",
       "      <td>29</td>\n",
       "      <td>66</td>\n",
       "      <td>4'30\"</td>\n",
       "      <td>66</td>\n",
       "      <td>4'25\"</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2840</td>\n",
       "      <td>64</td>\n",
       "      <td>1950</td>\n",
       "      <td>64</td>\n",
       "      <td>9.1</td>\n",
       "      <td>64</td>\n",
       "      <td>10.2</td>\n",
       "      <td>64</td>\n",
       "      <td>3.8</td>\n",
       "      <td>64</td>\n",
       "      <td>...</td>\n",
       "      <td>154</td>\n",
       "      <td>64</td>\n",
       "      <td>8.0</td>\n",
       "      <td>64</td>\n",
       "      <td>27</td>\n",
       "      <td>64</td>\n",
       "      <td>4'35\"</td>\n",
       "      <td>64</td>\n",
       "      <td>4'30\"</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2720</td>\n",
       "      <td>62</td>\n",
       "      <td>1850</td>\n",
       "      <td>62</td>\n",
       "      <td>9.3</td>\n",
       "      <td>62</td>\n",
       "      <td>10.4</td>\n",
       "      <td>62</td>\n",
       "      <td>2.4</td>\n",
       "      <td>62</td>\n",
       "      <td>...</td>\n",
       "      <td>151</td>\n",
       "      <td>62</td>\n",
       "      <td>NaN</td>\n",
       "      <td>62</td>\n",
       "      <td>25</td>\n",
       "      <td>62</td>\n",
       "      <td>4'40\"</td>\n",
       "      <td>62</td>\n",
       "      <td>4'35\"</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2600</td>\n",
       "      <td>60</td>\n",
       "      <td>1750</td>\n",
       "      <td>60</td>\n",
       "      <td>9.5</td>\n",
       "      <td>60</td>\n",
       "      <td>10.6</td>\n",
       "      <td>60</td>\n",
       "      <td>1.0</td>\n",
       "      <td>60</td>\n",
       "      <td>...</td>\n",
       "      <td>148</td>\n",
       "      <td>60</td>\n",
       "      <td>7.0</td>\n",
       "      <td>60</td>\n",
       "      <td>23</td>\n",
       "      <td>60</td>\n",
       "      <td>4'45\"</td>\n",
       "      <td>60</td>\n",
       "      <td>4'40\"</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2470</td>\n",
       "      <td>50</td>\n",
       "      <td>1710</td>\n",
       "      <td>50</td>\n",
       "      <td>9.7</td>\n",
       "      <td>50</td>\n",
       "      <td>10.8</td>\n",
       "      <td>50</td>\n",
       "      <td>0.0</td>\n",
       "      <td>50</td>\n",
       "      <td>...</td>\n",
       "      <td>143</td>\n",
       "      <td>50</td>\n",
       "      <td>6.0</td>\n",
       "      <td>50</td>\n",
       "      <td>21</td>\n",
       "      <td>50</td>\n",
       "      <td>5'05\"</td>\n",
       "      <td>50</td>\n",
       "      <td>4'50\"</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2340</td>\n",
       "      <td>40</td>\n",
       "      <td>1670</td>\n",
       "      <td>40</td>\n",
       "      <td>9.9</td>\n",
       "      <td>40</td>\n",
       "      <td>11.0</td>\n",
       "      <td>40</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>40</td>\n",
       "      <td>...</td>\n",
       "      <td>138</td>\n",
       "      <td>40</td>\n",
       "      <td>5.0</td>\n",
       "      <td>40</td>\n",
       "      <td>19</td>\n",
       "      <td>40</td>\n",
       "      <td>5'25\"</td>\n",
       "      <td>40</td>\n",
       "      <td>5'00\"</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2210</td>\n",
       "      <td>30</td>\n",
       "      <td>1630</td>\n",
       "      <td>30</td>\n",
       "      <td>10.1</td>\n",
       "      <td>30</td>\n",
       "      <td>11.2</td>\n",
       "      <td>30</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>30</td>\n",
       "      <td>...</td>\n",
       "      <td>133</td>\n",
       "      <td>30</td>\n",
       "      <td>4.0</td>\n",
       "      <td>30</td>\n",
       "      <td>17</td>\n",
       "      <td>30</td>\n",
       "      <td>5'45\"</td>\n",
       "      <td>30</td>\n",
       "      <td>5'10\"</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2080</td>\n",
       "      <td>20</td>\n",
       "      <td>1590</td>\n",
       "      <td>20</td>\n",
       "      <td>10.3</td>\n",
       "      <td>20</td>\n",
       "      <td>11.4</td>\n",
       "      <td>20</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>20</td>\n",
       "      <td>...</td>\n",
       "      <td>128</td>\n",
       "      <td>20</td>\n",
       "      <td>3.0</td>\n",
       "      <td>20</td>\n",
       "      <td>15</td>\n",
       "      <td>20</td>\n",
       "      <td>6'05\"</td>\n",
       "      <td>20</td>\n",
       "      <td>5'20\"</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1950</td>\n",
       "      <td>10</td>\n",
       "      <td>1550</td>\n",
       "      <td>10</td>\n",
       "      <td>10.5</td>\n",
       "      <td>10</td>\n",
       "      <td>11.6</td>\n",
       "      <td>10</td>\n",
       "      <td>-4.0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>123</td>\n",
       "      <td>10</td>\n",
       "      <td>2.0</td>\n",
       "      <td>10</td>\n",
       "      <td>13</td>\n",
       "      <td>10</td>\n",
       "      <td>6'25\"</td>\n",
       "      <td>10</td>\n",
       "      <td>5'30\"</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    男肺活量       女肺活量      男50米跑      女50米跑       男体前屈       ...  女跳远       \\\n",
       "      成绩   分数    成绩   分数    成绩   分数    成绩   分数    成绩   分数  ...   成绩   分数   \n",
       "0   4540  100  3150  100   7.1  100   7.8  100  23.6  100  ...  204  100   \n",
       "1   4420   95  3100   95   7.2   95   7.9   95  21.5   95  ...  198   95   \n",
       "2   4300   90  3050   90   7.3   90   8.0   90  19.4   90  ...  192   90   \n",
       "3   4050   85  2900   85   7.4   85   8.3   85  17.2   85  ...  185   85   \n",
       "4   3800   80  2750   80   7.5   80   8.6   80  15.0   80  ...  178   80   \n",
       "5   3680   78  2650   78   7.7   78   8.8   78  13.6   78  ...  175   78   \n",
       "6   3560   76  2550   76   7.9   76   9.0   76  12.2   76  ...  172   76   \n",
       "7   3440   74  2450   74   8.1   74   9.2   74  10.8   74  ...  169   74   \n",
       "8   3320   72  2350   72   8.3   72   9.4   72   9.4   72  ...  166   72   \n",
       "9   3200   70  2250   70   8.5   70   9.6   70   8.0   70  ...  163   70   \n",
       "10  3080   68  2150   68   8.7   68   9.8   68   6.6   68  ...  160   68   \n",
       "11  2960   66  2050   66   8.9   66  10.0   66   5.2   66  ...  157   66   \n",
       "12  2840   64  1950   64   9.1   64  10.2   64   3.8   64  ...  154   64   \n",
       "13  2720   62  1850   62   9.3   62  10.4   62   2.4   62  ...  151   62   \n",
       "14  2600   60  1750   60   9.5   60  10.6   60   1.0   60  ...  148   60   \n",
       "15  2470   50  1710   50   9.7   50  10.8   50   0.0   50  ...  143   50   \n",
       "16  2340   40  1670   40   9.9   40  11.0   40  -1.0   40  ...  138   40   \n",
       "17  2210   30  1630   30  10.1   30  11.2   30  -2.0   30  ...  133   30   \n",
       "18  2080   20  1590   20  10.3   20  11.4   20  -3.0   20  ...  128   20   \n",
       "19  1950   10  1550   10  10.5   10  11.6   10  -4.0   10  ...  123   10   \n",
       "\n",
       "     男引体      女仰卧      男1000米跑      女800米跑       \n",
       "      成绩   分数  成绩   分数      成绩   分数     成绩   分数  \n",
       "0   16.0  100  53  100   3'30\"  100  3'24\"  100  \n",
       "1   15.0   95  51   95   3'35\"   95  3'30\"   95  \n",
       "2   14.0   90  49   90   3'40\"   90  3'36\"   90  \n",
       "3   13.0   85  46   85   3'47\"   85  3'43\"   85  \n",
       "4   12.0   80  43   80   3'55\"   80  3'50\"   80  \n",
       "5    NaN   78  41   78   4'00\"   78  3'55\"   78  \n",
       "6   11.0   76  39   76   4'05\"   76  4'00\"   76  \n",
       "7    NaN   74  37   74   4'10\"   74  4'05\"   74  \n",
       "8   10.0   72  35   72   4'15\"   72  4'10\"   72  \n",
       "9    NaN   70  33   70   4'20\"   70  4'15\"   70  \n",
       "10   9.0   68  31   68   4'25\"   68  4'20\"   68  \n",
       "11   NaN   66  29   66   4'30\"   66  4'25\"   66  \n",
       "12   8.0   64  27   64   4'35\"   64  4'30\"   64  \n",
       "13   NaN   62  25   62   4'40\"   62  4'35\"   62  \n",
       "14   7.0   60  23   60   4'45\"   60  4'40\"   60  \n",
       "15   6.0   50  21   50   5'05\"   50  4'50\"   50  \n",
       "16   5.0   40  19   40   5'25\"   40  5'00\"   40  \n",
       "17   4.0   30  17   30   5'45\"   30  5'10\"   30  \n",
       "18   3.0   20  15   20   6'05\"   20  5'20\"   20  \n",
       "19   2.0   10  13   10   6'25\"   10  5'30\"   10  \n",
       "\n",
       "[20 rows x 24 columns]"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_formwork = pd.read_excel(r'C:\\Users\\Mr.Xiao\\Desktop\\模块四作业数据\\体侧成绩评分表.xls',sheet_name = 0,\n",
    "                               header=[0,1],\n",
    "                               index_col=None)#无行索引即为默认序列\n",
    "score_formwork"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66ad35c5",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 数据类型转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "a84180e0",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "male['男1000米跑']=male['男1000米跑'].str.replace('\\'','.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "id": "e900f293",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "male.iloc[:,2:] = male.iloc[:,2:].astype('float64')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "id": "f58dee34",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "男1000米跑    float64\n",
       "男50米跑      float64\n",
       "男跳远        float64\n",
       "男体前屈       float64\n",
       "男引体        float64\n",
       "男肺活量       float64\n",
       "身高         float64\n",
       "体重         float64\n",
       "BMI        float64\n",
       "dtype: object"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "male.iloc[:,2:].dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "id": "62449b2b",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "女50米跑    float64\n",
       "女跳远      float64\n",
       "女体前屈     float64\n",
       "女仰卧      float64\n",
       "女肺活量     float64\n",
       "身高       float64\n",
       "体重       float64\n",
       "BMI      float64\n",
       "dtype: object"
      ]
     },
     "execution_count": 251,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "female.iloc[:,3:] = female.iloc[:,3:].astype('float64')\n",
    "female.iloc[:,3:].dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "faab9333",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "id": "df5955c8",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "Can only use .str accessor with string values!",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/1156230756.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'男1000米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'男1000米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'\\''\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'.'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36m__getattr__\u001b[1;34m(self, name)\u001b[0m\n\u001b[0;32m   5485\u001b[0m         ):\n\u001b[0;32m   5486\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 5487\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   5488\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   5489\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m__setattr__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\accessor.py\u001b[0m in \u001b[0;36m__get__\u001b[1;34m(self, obj, cls)\u001b[0m\n\u001b[0;32m    179\u001b[0m             \u001b[1;31m# we're accessing the attribute of the class, i.e., Dataset.geo\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    180\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 181\u001b[1;33m         \u001b[0maccessor_obj\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    182\u001b[0m         \u001b[1;31m# Replace the property with the accessor object. Inspired by:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    183\u001b[0m         \u001b[1;31m# https://www.pydanny.com/cached-property.html\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\strings\\accessor.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, data)\u001b[0m\n\u001b[0;32m    166\u001b[0m         \u001b[1;32mfrom\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0marrays\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstring_\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mStringDtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    167\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 168\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_inferred_dtype\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_validate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    169\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_categorical\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mis_categorical_dtype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    170\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_string\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mStringDtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\strings\\accessor.py\u001b[0m in \u001b[0;36m_validate\u001b[1;34m(data)\u001b[0m\n\u001b[0;32m    223\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    224\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0minferred_dtype\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mallowed_types\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 225\u001b[1;33m             \u001b[1;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Can only use .str accessor with string values!\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    226\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0minferred_dtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    227\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mAttributeError\u001b[0m: Can only use .str accessor with string values!"
     ]
    }
   ],
   "source": [
    "score_formwork.loc[:,('男1000米跑','成绩')] = score_formwork.loc[:,('男1000米跑','成绩')].str.replace('\\'','.') #此部分已执行故报错\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "id": "8d1fe5dd",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "score_formwork.loc[:,('男1000米跑','成绩')] =score_formwork.loc[:,('男1000米跑','成绩')].str.replace('\\\"','')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 230,
   "id": "afa730e5",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "Can only use .str accessor with string values!",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/1494387704.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'女800米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m\u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'女800米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'\\\"'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m''\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36m__getattr__\u001b[1;34m(self, name)\u001b[0m\n\u001b[0;32m   5485\u001b[0m         ):\n\u001b[0;32m   5486\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 5487\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   5488\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   5489\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m__setattr__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\accessor.py\u001b[0m in \u001b[0;36m__get__\u001b[1;34m(self, obj, cls)\u001b[0m\n\u001b[0;32m    179\u001b[0m             \u001b[1;31m# we're accessing the attribute of the class, i.e., Dataset.geo\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    180\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 181\u001b[1;33m         \u001b[0maccessor_obj\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    182\u001b[0m         \u001b[1;31m# Replace the property with the accessor object. Inspired by:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    183\u001b[0m         \u001b[1;31m# https://www.pydanny.com/cached-property.html\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\strings\\accessor.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, data)\u001b[0m\n\u001b[0;32m    166\u001b[0m         \u001b[1;32mfrom\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0marrays\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstring_\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mStringDtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    167\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 168\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_inferred_dtype\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_validate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    169\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_categorical\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mis_categorical_dtype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    170\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_string\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mStringDtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\strings\\accessor.py\u001b[0m in \u001b[0;36m_validate\u001b[1;34m(data)\u001b[0m\n\u001b[0;32m    223\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    224\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0minferred_dtype\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mallowed_types\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 225\u001b[1;33m             \u001b[1;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Can only use .str accessor with string values!\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    226\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0minferred_dtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    227\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mAttributeError\u001b[0m: Can only use .str accessor with string values!"
     ]
    }
   ],
   "source": [
    "score_formwork.loc[:,('女800米跑','成绩')] =score_formwork.loc[:,('女800米跑','成绩')].str.replace('\\\"','')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "id": "2d1d5b26",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "Can only use .str accessor with string values!",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/3030260127.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'女800米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m\u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'女800米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreplace\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'\\''\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'.'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36m__getattr__\u001b[1;34m(self, name)\u001b[0m\n\u001b[0;32m   5485\u001b[0m         ):\n\u001b[0;32m   5486\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 5487\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mobject\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__getattribute__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   5488\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   5489\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m__setattr__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\accessor.py\u001b[0m in \u001b[0;36m__get__\u001b[1;34m(self, obj, cls)\u001b[0m\n\u001b[0;32m    179\u001b[0m             \u001b[1;31m# we're accessing the attribute of the class, i.e., Dataset.geo\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    180\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 181\u001b[1;33m         \u001b[0maccessor_obj\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_accessor\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    182\u001b[0m         \u001b[1;31m# Replace the property with the accessor object. Inspired by:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    183\u001b[0m         \u001b[1;31m# https://www.pydanny.com/cached-property.html\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\strings\\accessor.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, data)\u001b[0m\n\u001b[0;32m    166\u001b[0m         \u001b[1;32mfrom\u001b[0m \u001b[0mpandas\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0marrays\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstring_\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mStringDtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    167\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 168\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_inferred_dtype\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_validate\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    169\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_categorical\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mis_categorical_dtype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    170\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_string\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mStringDtype\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\strings\\accessor.py\u001b[0m in \u001b[0;36m_validate\u001b[1;34m(data)\u001b[0m\n\u001b[0;32m    223\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    224\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0minferred_dtype\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mallowed_types\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 225\u001b[1;33m             \u001b[1;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"Can only use .str accessor with string values!\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    226\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0minferred_dtype\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    227\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mAttributeError\u001b[0m: Can only use .str accessor with string values!"
     ]
    }
   ],
   "source": [
    "score_formwork.loc[:,('女800米跑','成绩')] =score_formwork.loc[:,('女800米跑','成绩')].str.replace('\\'','.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "id": "a51a04aa",
   "metadata": {
    "hidden": true,
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "score_formwork.loc[:,('女800米跑','成绩')] = score_formwork.loc[:,('女800米跑','成绩')].astype('float64')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "id": "231df437",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "('女1000米跑', '成绩')",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m   3360\u001b[0m             \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 3361\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcasted_key\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3362\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0merr\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mpandas\\_libs\\hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;31mKeyError\u001b[0m: '女1000米跑'",
      "\nThe above exception was the direct cause of the following exception:\n",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.BaseMultiIndexCodesEngine.get_loc\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexes\\base.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method, tolerance)\u001b[0m\n\u001b[0;32m   3362\u001b[0m             \u001b[1;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0merr\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 3363\u001b[1;33m                 \u001b[1;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0merr\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3364\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mKeyError\u001b[0m: '女1000米跑'",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/3941603083.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'女1000米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mscore_formwork\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'女1000米跑'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'成绩'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'float64'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m__getitem__\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m    923\u001b[0m                 \u001b[1;32mwith\u001b[0m \u001b[0msuppress\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mKeyError\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    924\u001b[0m                     \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_get_value\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtakeable\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_takeable\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 925\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_tuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    926\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    927\u001b[0m             \u001b[1;31m# we by definition only have the 0th axis\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_getitem_tuple\u001b[1;34m(self, tup)\u001b[0m\n\u001b[0;32m   1098\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_getitem_tuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mtuple\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1099\u001b[0m         \u001b[1;32mwith\u001b[0m \u001b[0msuppress\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mIndexingError\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1100\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_lowerdim\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1101\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1102\u001b[0m         \u001b[1;31m# no multi-index, so validate all of the indexers\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_getitem_lowerdim\u001b[1;34m(self, tup)\u001b[0m\n\u001b[0;32m    820\u001b[0m         \u001b[1;31m# we may have a nested tuples indexer here\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    821\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_is_nested_tuple_indexer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 822\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_nested_tuple\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    823\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    824\u001b[0m         \u001b[1;31m# we maybe be using a tuple to represent multiple dimensions here\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_getitem_nested_tuple\u001b[1;34m(self, tup)\u001b[0m\n\u001b[0;32m    904\u001b[0m                 \u001b[1;32mcontinue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    905\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 906\u001b[1;33m             \u001b[0mobj\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_axis\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    907\u001b[0m             \u001b[0maxis\u001b[0m \u001b[1;33m-=\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    908\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_getitem_axis\u001b[1;34m(self, key, axis)\u001b[0m\n\u001b[0;32m   1162\u001b[0m         \u001b[1;31m# fall thru to straight lookup\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1163\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_validate_key\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1164\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_get_label\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1165\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1166\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_get_slice_axis\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mslice_obj\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mslice\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mint\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexing.py\u001b[0m in \u001b[0;36m_get_label\u001b[1;34m(self, label, axis)\u001b[0m\n\u001b[0;32m   1111\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_get_label\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mint\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1112\u001b[0m         \u001b[1;31m# GH#5667 this will fail if the label is not present in the axis.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1113\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mxs\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1114\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1115\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_handle_lowerdim_multi_index_axis0\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtup\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mtuple\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36mxs\u001b[1;34m(self, key, axis, level, drop_level)\u001b[0m\n\u001b[0;32m   3759\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0maxis\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3760\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0mdrop_level\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 3761\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3762\u001b[0m             \u001b[0mindex\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3763\u001b[0m         \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\frame.py\u001b[0m in \u001b[0;36m__getitem__\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m   3455\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mis_single_key\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3456\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[1;33m>\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 3457\u001b[1;33m                 \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_getitem_multilevel\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3458\u001b[0m             \u001b[0mindexer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3459\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0mis_integer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mindexer\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\frame.py\u001b[0m in \u001b[0;36m_getitem_multilevel\u001b[1;34m(self, key)\u001b[0m\n\u001b[0;32m   3506\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_getitem_multilevel\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3507\u001b[0m         \u001b[1;31m# self.columns is a MultiIndex\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 3508\u001b[1;33m         \u001b[0mloc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   3509\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mslice\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mndarray\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   3510\u001b[0m             \u001b[0mnew_columns\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mloc\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\indexes\\multi.py\u001b[0m in \u001b[0;36mget_loc\u001b[1;34m(self, key, method)\u001b[0m\n\u001b[0;32m   2930\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2931\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mkeylen\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnlevels\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mis_unique\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2932\u001b[1;33m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_engine\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   2933\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2934\u001b[0m         \u001b[1;31m# -- partial selection or non-unique index\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\_libs\\index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.BaseMultiIndexCodesEngine.get_loc\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;31mKeyError\u001b[0m: ('女1000米跑', '成绩')"
     ]
    }
   ],
   "source": [
    "score_formwork.loc[:,('女1000米跑','成绩')] = score_formwork.loc[:,('女1000米跑','成绩')].astype('float64')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2d05181a",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 数据分析(请见第四部分，本节中为作业中的尝试步骤）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4a3eb384",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "pd.merge(male,score_formwork,how='inner',\n",
    "         left_on =('男50米跑'),\n",
    "         right_on =('男50米跑'|'成绩'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9d0ab243",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "d = score_formwork.iloc[:,4].values\n",
    "e = score_formwork.iloc[:,5].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "87136469",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "id": "c2fa9476",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "male['BMI'] = (male['体重']/(male['身高']/100)**2).round(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "id": "3fbd787e",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "female['BMI'] = (female['体重']/(female['身高']/100)**2).round(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 334,
   "id": "9cf61a09",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "IndentationError",
     "evalue": "expected an indented block (Temp/ipykernel_12208/4238609923.py, line 4)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"C:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/4238609923.py\"\u001b[1;36m, line \u001b[1;32m4\u001b[0m\n\u001b[1;33m    for j in e:\u001b[0m\n\u001b[1;37m      ^\u001b[0m\n\u001b[1;31mIndentationError\u001b[0m\u001b[1;31m:\u001b[0m expected an indented block\n"
     ]
    }
   ],
   "source": [
    "male_50_index =[]\n",
    "def convert(x):\n",
    "    for i in d:\n",
    "        for j in e:\n",
    "            male_50_index.append({i:j})\n",
    "convert(1)\n",
    "male_50_index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 323,
   "id": "02dafd98",
   "metadata": {
    "code_folding": [],
    "hidden": true,
    "scrolled": true
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'index' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/1185933177.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[1;31m#         x\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      6\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 7\u001b[1;33m \u001b[0mmale\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'男50米跑'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmap\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mconvert\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\series.py\u001b[0m in \u001b[0;36mmap\u001b[1;34m(self, arg, na_action)\u001b[0m\n\u001b[0;32m   4159\u001b[0m         \u001b[0mdtype\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mobject\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   4160\u001b[0m         \"\"\"\n\u001b[1;32m-> 4161\u001b[1;33m         \u001b[0mnew_values\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msuper\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_map_values\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0marg\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mna_action\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mna_action\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   4162\u001b[0m         return self._constructor(new_values, index=self.index).__finalize__(\n\u001b[0;32m   4163\u001b[0m             \u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmethod\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m\"map\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\core\\base.py\u001b[0m in \u001b[0;36m_map_values\u001b[1;34m(self, mapper, na_action)\u001b[0m\n\u001b[0;32m    868\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    869\u001b[0m         \u001b[1;31m# mapper is a function\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 870\u001b[1;33m         \u001b[0mnew_values\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmap_f\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mmapper\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    871\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    872\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mnew_values\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mc:\\users\\mr.xiao\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\pandas\\_libs\\lib.pyx\u001b[0m in \u001b[0;36mpandas._libs.lib.map_infer\u001b[1;34m()\u001b[0m\n",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/3417288984.py\u001b[0m in \u001b[0;36mconvert\u001b[1;34m(x)\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mconvert\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m     \u001b[1;32mif\u001b[0m \u001b[0mround\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;32min\u001b[0m \u001b[0md\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mindex\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      5\u001b[0m \u001b[0mconvert\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m7.1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'index' is not defined"
     ]
    }
   ],
   "source": [
    "# def convert(x):\n",
    "#     if round(x,1) in score_formwork.iloc[:,4]:\n",
    "#         return index\n",
    "#     else:\n",
    "#         x\n",
    "\n",
    "male['男50米跑'].map(convert)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 327,
   "id": "4843002f",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "unhashable type: 'numpy.ndarray'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32mC:\\Users\\MR707B~1.XIA\\AppData\\Local\\Temp/ipykernel_12208/2495007913.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdict\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[0md\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0me\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: unhashable type: 'numpy.ndarray'"
     ]
    }
   ],
   "source": [
    "dict({d:e})"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "be617b8f",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "# 额外需求(性别/班级评分差异）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 364,
   "id": "d84f3d8e",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "\n",
    "def convert(x):\n",
    "    x = np.round(x, 1)\n",
    "    tmp = score_formwork['男50米跑'].sort_values('成绩')\n",
    "    exist = (x <= tmp['成绩']).sum()\n",
    "    if exist > 0 and x != 0:\n",
    "        idx = tmp['成绩'][x <= tmp['成绩']].sort_values().index[0]\n",
    "        return tmp.loc[idx, '分数']\n",
    "    else:\n",
    "        return 0\n",
    "    \n",
    "male['50米分数']= male['男50米跑'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 366,
   "id": "1f65ae93",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):\n",
    "    score_index = score_formwork['男1000米跑']\n",
    "    exist = (x<=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:\n",
    "        grade = score_index['成绩'][ x<=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "male['1000米跑分数'] = male['男1000米跑'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 378,
   "id": "96540a38",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['男跳远']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "male['跳远分数'] = male['男跳远'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 381,
   "id": "4da0b7e4",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['男引体']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "male['引体分数'] = male['男引体'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 383,
   "id": "458d0ad3",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['男肺活量']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "male['肺活量分数'] = male['男肺活量'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 385,
   "id": "2e2be0f8",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['男体前屈']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "male['前屈分数'] = male['男体前屈'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 386,
   "id": "e4553ee6",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>班级</th>\n",
       "      <th>性别</th>\n",
       "      <th>男1000米跑</th>\n",
       "      <th>男50米跑</th>\n",
       "      <th>男跳远</th>\n",
       "      <th>男体前屈</th>\n",
       "      <th>男引体</th>\n",
       "      <th>男肺活量</th>\n",
       "      <th>身高</th>\n",
       "      <th>体重</th>\n",
       "      <th>BMI</th>\n",
       "      <th>50米分数</th>\n",
       "      <th>1000米跑分数</th>\n",
       "      <th>跳远分数</th>\n",
       "      <th>引体分数</th>\n",
       "      <th>肺活量分数</th>\n",
       "      <th>前屈分数</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4.13</td>\n",
       "      <td>8.88</td>\n",
       "      <td>195.0</td>\n",
       "      <td>12.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2785.0</td>\n",
       "      <td>170.0</td>\n",
       "      <td>72.599998</td>\n",
       "      <td>25.120001</td>\n",
       "      <td>66</td>\n",
       "      <td>72</td>\n",
       "      <td>60</td>\n",
       "      <td>0</td>\n",
       "      <td>62</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4.16</td>\n",
       "      <td>7.70</td>\n",
       "      <td>225.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>3133.0</td>\n",
       "      <td>174.0</td>\n",
       "      <td>52.700001</td>\n",
       "      <td>17.410000</td>\n",
       "      <td>78</td>\n",
       "      <td>70</td>\n",
       "      <td>74</td>\n",
       "      <td>60</td>\n",
       "      <td>68</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4.09</td>\n",
       "      <td>8.45</td>\n",
       "      <td>218.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3901.0</td>\n",
       "      <td>169.0</td>\n",
       "      <td>46.500000</td>\n",
       "      <td>16.280001</td>\n",
       "      <td>70</td>\n",
       "      <td>74</td>\n",
       "      <td>70</td>\n",
       "      <td>0</td>\n",
       "      <td>80</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>4.21</td>\n",
       "      <td>8.05</td>\n",
       "      <td>206.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4946.0</td>\n",
       "      <td>183.0</td>\n",
       "      <td>79.699997</td>\n",
       "      <td>23.799999</td>\n",
       "      <td>74</td>\n",
       "      <td>68</td>\n",
       "      <td>64</td>\n",
       "      <td>0</td>\n",
       "      <td>100</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>3.44</td>\n",
       "      <td>7.52</td>\n",
       "      <td>210.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>3538.0</td>\n",
       "      <td>171.0</td>\n",
       "      <td>54.700001</td>\n",
       "      <td>18.709999</td>\n",
       "      <td>80</td>\n",
       "      <td>85</td>\n",
       "      <td>66</td>\n",
       "      <td>68</td>\n",
       "      <td>74</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>472</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>4.23</td>\n",
       "      <td>8.27</td>\n",
       "      <td>208.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4647.0</td>\n",
       "      <td>176.0</td>\n",
       "      <td>69.500000</td>\n",
       "      <td>22.440001</td>\n",
       "      <td>72</td>\n",
       "      <td>68</td>\n",
       "      <td>66</td>\n",
       "      <td>0</td>\n",
       "      <td>100</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>473</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>5.19</td>\n",
       "      <td>9.55</td>\n",
       "      <td>210.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>6.0</td>\n",
       "      <td>7042.0</td>\n",
       "      <td>177.0</td>\n",
       "      <td>76.000000</td>\n",
       "      <td>24.260000</td>\n",
       "      <td>50</td>\n",
       "      <td>40</td>\n",
       "      <td>66</td>\n",
       "      <td>50</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>474</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>3.25</td>\n",
       "      <td>7.50</td>\n",
       "      <td>252.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>13.0</td>\n",
       "      <td>5755.0</td>\n",
       "      <td>181.0</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>19.840000</td>\n",
       "      <td>80</td>\n",
       "      <td>100</td>\n",
       "      <td>90</td>\n",
       "      <td>85</td>\n",
       "      <td>100</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>475</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>4.39</td>\n",
       "      <td>7.81</td>\n",
       "      <td>208.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>5688.0</td>\n",
       "      <td>172.0</td>\n",
       "      <td>51.700001</td>\n",
       "      <td>17.480000</td>\n",
       "      <td>76</td>\n",
       "      <td>62</td>\n",
       "      <td>66</td>\n",
       "      <td>76</td>\n",
       "      <td>100</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>477 rows × 17 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     班级 性别  男1000米跑  男50米跑    男跳远  男体前屈   男引体    男肺活量     身高         体重  \\\n",
       "0     1  男     4.13   8.88  195.0  12.0   1.0  2785.0  170.0  72.599998   \n",
       "1     1  男     4.16   7.70  225.0  11.0   7.0  3133.0  174.0  52.700001   \n",
       "2     1  男     4.09   8.45  218.0  14.0   1.0  3901.0  169.0  46.500000   \n",
       "3     1  男     4.21   8.05  206.0  13.0   1.0  4946.0  183.0  79.699997   \n",
       "4     1  男     3.44   7.52  210.0  13.0   9.0  3538.0  171.0  54.700001   \n",
       "..   .. ..      ...    ...    ...   ...   ...     ...    ...        ...   \n",
       "472  17  男     4.23   8.27  208.0  10.0   0.0  4647.0  176.0  69.500000   \n",
       "473  17  男     5.19   9.55  210.0  15.0   6.0  7042.0  177.0  76.000000   \n",
       "474  17  男     3.25   7.50  252.0  13.0  13.0  5755.0  181.0  65.000000   \n",
       "475  17  男     4.39   7.81  208.0  14.0  11.0  5688.0  172.0  51.700001   \n",
       "476  17  男      NaN   0.00    0.0   0.0   0.0     0.0    0.0   0.000000   \n",
       "\n",
       "           BMI  50米分数  1000米跑分数  跳远分数  引体分数  肺活量分数  前屈分数  \n",
       "0    25.120001     66        72    60     0     62    74  \n",
       "1    17.410000     78        70    74    60     68    74  \n",
       "2    16.280001     70        74    70     0     80    78  \n",
       "3    23.799999     74        68    64     0    100    76  \n",
       "4    18.709999     80        85    66    68     74    76  \n",
       "..         ...    ...       ...   ...   ...    ...   ...  \n",
       "472  22.440001     72        68    66     0    100    72  \n",
       "473  24.260000     50        40    66    50    100    80  \n",
       "474  19.840000     80       100    90    85    100    76  \n",
       "475  17.480000     76        62    66    76    100    78  \n",
       "476        NaN      0         0     0     0      0     0  \n",
       "\n",
       "[477 rows x 17 columns]"
      ]
     },
     "execution_count": 386,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "male"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 373,
   "id": "b03e3163",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"2\" halign=\"left\">男肺活量</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女肺活量</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男50米跑</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女50米跑</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男体前屈</th>\n",
       "      <th>...</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女跳远</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男引体</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女仰卧</th>\n",
       "      <th colspan=\"2\" halign=\"left\">男1000米跑</th>\n",
       "      <th colspan=\"2\" halign=\"left\">女800米跑</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>...</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "      <th>成绩</th>\n",
       "      <th>分数</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4540</td>\n",
       "      <td>100</td>\n",
       "      <td>3150</td>\n",
       "      <td>100</td>\n",
       "      <td>7.1</td>\n",
       "      <td>100</td>\n",
       "      <td>7.8</td>\n",
       "      <td>100</td>\n",
       "      <td>23.6</td>\n",
       "      <td>100</td>\n",
       "      <td>...</td>\n",
       "      <td>204</td>\n",
       "      <td>100</td>\n",
       "      <td>16.0</td>\n",
       "      <td>100</td>\n",
       "      <td>53</td>\n",
       "      <td>100</td>\n",
       "      <td>3.30</td>\n",
       "      <td>100</td>\n",
       "      <td>3.24</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4420</td>\n",
       "      <td>95</td>\n",
       "      <td>3100</td>\n",
       "      <td>95</td>\n",
       "      <td>7.2</td>\n",
       "      <td>95</td>\n",
       "      <td>7.9</td>\n",
       "      <td>95</td>\n",
       "      <td>21.5</td>\n",
       "      <td>95</td>\n",
       "      <td>...</td>\n",
       "      <td>198</td>\n",
       "      <td>95</td>\n",
       "      <td>15.0</td>\n",
       "      <td>95</td>\n",
       "      <td>51</td>\n",
       "      <td>95</td>\n",
       "      <td>3.35</td>\n",
       "      <td>95</td>\n",
       "      <td>3.30</td>\n",
       "      <td>95</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4300</td>\n",
       "      <td>90</td>\n",
       "      <td>3050</td>\n",
       "      <td>90</td>\n",
       "      <td>7.3</td>\n",
       "      <td>90</td>\n",
       "      <td>8.0</td>\n",
       "      <td>90</td>\n",
       "      <td>19.4</td>\n",
       "      <td>90</td>\n",
       "      <td>...</td>\n",
       "      <td>192</td>\n",
       "      <td>90</td>\n",
       "      <td>14.0</td>\n",
       "      <td>90</td>\n",
       "      <td>49</td>\n",
       "      <td>90</td>\n",
       "      <td>3.40</td>\n",
       "      <td>90</td>\n",
       "      <td>3.36</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4050</td>\n",
       "      <td>85</td>\n",
       "      <td>2900</td>\n",
       "      <td>85</td>\n",
       "      <td>7.4</td>\n",
       "      <td>85</td>\n",
       "      <td>8.3</td>\n",
       "      <td>85</td>\n",
       "      <td>17.2</td>\n",
       "      <td>85</td>\n",
       "      <td>...</td>\n",
       "      <td>185</td>\n",
       "      <td>85</td>\n",
       "      <td>13.0</td>\n",
       "      <td>85</td>\n",
       "      <td>46</td>\n",
       "      <td>85</td>\n",
       "      <td>3.47</td>\n",
       "      <td>85</td>\n",
       "      <td>3.43</td>\n",
       "      <td>85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3800</td>\n",
       "      <td>80</td>\n",
       "      <td>2750</td>\n",
       "      <td>80</td>\n",
       "      <td>7.5</td>\n",
       "      <td>80</td>\n",
       "      <td>8.6</td>\n",
       "      <td>80</td>\n",
       "      <td>15.0</td>\n",
       "      <td>80</td>\n",
       "      <td>...</td>\n",
       "      <td>178</td>\n",
       "      <td>80</td>\n",
       "      <td>12.0</td>\n",
       "      <td>80</td>\n",
       "      <td>43</td>\n",
       "      <td>80</td>\n",
       "      <td>3.55</td>\n",
       "      <td>80</td>\n",
       "      <td>3.50</td>\n",
       "      <td>80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>3680</td>\n",
       "      <td>78</td>\n",
       "      <td>2650</td>\n",
       "      <td>78</td>\n",
       "      <td>7.7</td>\n",
       "      <td>78</td>\n",
       "      <td>8.8</td>\n",
       "      <td>78</td>\n",
       "      <td>13.6</td>\n",
       "      <td>78</td>\n",
       "      <td>...</td>\n",
       "      <td>175</td>\n",
       "      <td>78</td>\n",
       "      <td>NaN</td>\n",
       "      <td>78</td>\n",
       "      <td>41</td>\n",
       "      <td>78</td>\n",
       "      <td>4.00</td>\n",
       "      <td>78</td>\n",
       "      <td>3.55</td>\n",
       "      <td>78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3560</td>\n",
       "      <td>76</td>\n",
       "      <td>2550</td>\n",
       "      <td>76</td>\n",
       "      <td>7.9</td>\n",
       "      <td>76</td>\n",
       "      <td>9.0</td>\n",
       "      <td>76</td>\n",
       "      <td>12.2</td>\n",
       "      <td>76</td>\n",
       "      <td>...</td>\n",
       "      <td>172</td>\n",
       "      <td>76</td>\n",
       "      <td>11.0</td>\n",
       "      <td>76</td>\n",
       "      <td>39</td>\n",
       "      <td>76</td>\n",
       "      <td>4.05</td>\n",
       "      <td>76</td>\n",
       "      <td>4.00</td>\n",
       "      <td>76</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3440</td>\n",
       "      <td>74</td>\n",
       "      <td>2450</td>\n",
       "      <td>74</td>\n",
       "      <td>8.1</td>\n",
       "      <td>74</td>\n",
       "      <td>9.2</td>\n",
       "      <td>74</td>\n",
       "      <td>10.8</td>\n",
       "      <td>74</td>\n",
       "      <td>...</td>\n",
       "      <td>169</td>\n",
       "      <td>74</td>\n",
       "      <td>NaN</td>\n",
       "      <td>74</td>\n",
       "      <td>37</td>\n",
       "      <td>74</td>\n",
       "      <td>4.10</td>\n",
       "      <td>74</td>\n",
       "      <td>4.05</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3320</td>\n",
       "      <td>72</td>\n",
       "      <td>2350</td>\n",
       "      <td>72</td>\n",
       "      <td>8.3</td>\n",
       "      <td>72</td>\n",
       "      <td>9.4</td>\n",
       "      <td>72</td>\n",
       "      <td>9.4</td>\n",
       "      <td>72</td>\n",
       "      <td>...</td>\n",
       "      <td>166</td>\n",
       "      <td>72</td>\n",
       "      <td>10.0</td>\n",
       "      <td>72</td>\n",
       "      <td>35</td>\n",
       "      <td>72</td>\n",
       "      <td>4.15</td>\n",
       "      <td>72</td>\n",
       "      <td>4.10</td>\n",
       "      <td>72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>3200</td>\n",
       "      <td>70</td>\n",
       "      <td>2250</td>\n",
       "      <td>70</td>\n",
       "      <td>8.5</td>\n",
       "      <td>70</td>\n",
       "      <td>9.6</td>\n",
       "      <td>70</td>\n",
       "      <td>8.0</td>\n",
       "      <td>70</td>\n",
       "      <td>...</td>\n",
       "      <td>163</td>\n",
       "      <td>70</td>\n",
       "      <td>NaN</td>\n",
       "      <td>70</td>\n",
       "      <td>33</td>\n",
       "      <td>70</td>\n",
       "      <td>4.20</td>\n",
       "      <td>70</td>\n",
       "      <td>4.15</td>\n",
       "      <td>70</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>3080</td>\n",
       "      <td>68</td>\n",
       "      <td>2150</td>\n",
       "      <td>68</td>\n",
       "      <td>8.7</td>\n",
       "      <td>68</td>\n",
       "      <td>9.8</td>\n",
       "      <td>68</td>\n",
       "      <td>6.6</td>\n",
       "      <td>68</td>\n",
       "      <td>...</td>\n",
       "      <td>160</td>\n",
       "      <td>68</td>\n",
       "      <td>9.0</td>\n",
       "      <td>68</td>\n",
       "      <td>31</td>\n",
       "      <td>68</td>\n",
       "      <td>4.25</td>\n",
       "      <td>68</td>\n",
       "      <td>4.20</td>\n",
       "      <td>68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2960</td>\n",
       "      <td>66</td>\n",
       "      <td>2050</td>\n",
       "      <td>66</td>\n",
       "      <td>8.9</td>\n",
       "      <td>66</td>\n",
       "      <td>10.0</td>\n",
       "      <td>66</td>\n",
       "      <td>5.2</td>\n",
       "      <td>66</td>\n",
       "      <td>...</td>\n",
       "      <td>157</td>\n",
       "      <td>66</td>\n",
       "      <td>NaN</td>\n",
       "      <td>66</td>\n",
       "      <td>29</td>\n",
       "      <td>66</td>\n",
       "      <td>4.30</td>\n",
       "      <td>66</td>\n",
       "      <td>4.25</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2840</td>\n",
       "      <td>64</td>\n",
       "      <td>1950</td>\n",
       "      <td>64</td>\n",
       "      <td>9.1</td>\n",
       "      <td>64</td>\n",
       "      <td>10.2</td>\n",
       "      <td>64</td>\n",
       "      <td>3.8</td>\n",
       "      <td>64</td>\n",
       "      <td>...</td>\n",
       "      <td>154</td>\n",
       "      <td>64</td>\n",
       "      <td>8.0</td>\n",
       "      <td>64</td>\n",
       "      <td>27</td>\n",
       "      <td>64</td>\n",
       "      <td>4.35</td>\n",
       "      <td>64</td>\n",
       "      <td>4.30</td>\n",
       "      <td>64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2720</td>\n",
       "      <td>62</td>\n",
       "      <td>1850</td>\n",
       "      <td>62</td>\n",
       "      <td>9.3</td>\n",
       "      <td>62</td>\n",
       "      <td>10.4</td>\n",
       "      <td>62</td>\n",
       "      <td>2.4</td>\n",
       "      <td>62</td>\n",
       "      <td>...</td>\n",
       "      <td>151</td>\n",
       "      <td>62</td>\n",
       "      <td>NaN</td>\n",
       "      <td>62</td>\n",
       "      <td>25</td>\n",
       "      <td>62</td>\n",
       "      <td>4.40</td>\n",
       "      <td>62</td>\n",
       "      <td>4.35</td>\n",
       "      <td>62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2600</td>\n",
       "      <td>60</td>\n",
       "      <td>1750</td>\n",
       "      <td>60</td>\n",
       "      <td>9.5</td>\n",
       "      <td>60</td>\n",
       "      <td>10.6</td>\n",
       "      <td>60</td>\n",
       "      <td>1.0</td>\n",
       "      <td>60</td>\n",
       "      <td>...</td>\n",
       "      <td>148</td>\n",
       "      <td>60</td>\n",
       "      <td>7.0</td>\n",
       "      <td>60</td>\n",
       "      <td>23</td>\n",
       "      <td>60</td>\n",
       "      <td>4.45</td>\n",
       "      <td>60</td>\n",
       "      <td>4.40</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2470</td>\n",
       "      <td>50</td>\n",
       "      <td>1710</td>\n",
       "      <td>50</td>\n",
       "      <td>9.7</td>\n",
       "      <td>50</td>\n",
       "      <td>10.8</td>\n",
       "      <td>50</td>\n",
       "      <td>0.0</td>\n",
       "      <td>50</td>\n",
       "      <td>...</td>\n",
       "      <td>143</td>\n",
       "      <td>50</td>\n",
       "      <td>6.0</td>\n",
       "      <td>50</td>\n",
       "      <td>21</td>\n",
       "      <td>50</td>\n",
       "      <td>5.05</td>\n",
       "      <td>50</td>\n",
       "      <td>4.50</td>\n",
       "      <td>50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2340</td>\n",
       "      <td>40</td>\n",
       "      <td>1670</td>\n",
       "      <td>40</td>\n",
       "      <td>9.9</td>\n",
       "      <td>40</td>\n",
       "      <td>11.0</td>\n",
       "      <td>40</td>\n",
       "      <td>-1.0</td>\n",
       "      <td>40</td>\n",
       "      <td>...</td>\n",
       "      <td>138</td>\n",
       "      <td>40</td>\n",
       "      <td>5.0</td>\n",
       "      <td>40</td>\n",
       "      <td>19</td>\n",
       "      <td>40</td>\n",
       "      <td>5.25</td>\n",
       "      <td>40</td>\n",
       "      <td>5.00</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2210</td>\n",
       "      <td>30</td>\n",
       "      <td>1630</td>\n",
       "      <td>30</td>\n",
       "      <td>10.1</td>\n",
       "      <td>30</td>\n",
       "      <td>11.2</td>\n",
       "      <td>30</td>\n",
       "      <td>-2.0</td>\n",
       "      <td>30</td>\n",
       "      <td>...</td>\n",
       "      <td>133</td>\n",
       "      <td>30</td>\n",
       "      <td>4.0</td>\n",
       "      <td>30</td>\n",
       "      <td>17</td>\n",
       "      <td>30</td>\n",
       "      <td>5.45</td>\n",
       "      <td>30</td>\n",
       "      <td>5.10</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2080</td>\n",
       "      <td>20</td>\n",
       "      <td>1590</td>\n",
       "      <td>20</td>\n",
       "      <td>10.3</td>\n",
       "      <td>20</td>\n",
       "      <td>11.4</td>\n",
       "      <td>20</td>\n",
       "      <td>-3.0</td>\n",
       "      <td>20</td>\n",
       "      <td>...</td>\n",
       "      <td>128</td>\n",
       "      <td>20</td>\n",
       "      <td>3.0</td>\n",
       "      <td>20</td>\n",
       "      <td>15</td>\n",
       "      <td>20</td>\n",
       "      <td>6.05</td>\n",
       "      <td>20</td>\n",
       "      <td>5.20</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1950</td>\n",
       "      <td>10</td>\n",
       "      <td>1550</td>\n",
       "      <td>10</td>\n",
       "      <td>10.5</td>\n",
       "      <td>10</td>\n",
       "      <td>11.6</td>\n",
       "      <td>10</td>\n",
       "      <td>-4.0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>123</td>\n",
       "      <td>10</td>\n",
       "      <td>2.0</td>\n",
       "      <td>10</td>\n",
       "      <td>13</td>\n",
       "      <td>10</td>\n",
       "      <td>6.25</td>\n",
       "      <td>10</td>\n",
       "      <td>5.30</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    男肺活量       女肺活量      男50米跑      女50米跑       男体前屈       ...  女跳远       \\\n",
       "      成绩   分数    成绩   分数    成绩   分数    成绩   分数    成绩   分数  ...   成绩   分数   \n",
       "0   4540  100  3150  100   7.1  100   7.8  100  23.6  100  ...  204  100   \n",
       "1   4420   95  3100   95   7.2   95   7.9   95  21.5   95  ...  198   95   \n",
       "2   4300   90  3050   90   7.3   90   8.0   90  19.4   90  ...  192   90   \n",
       "3   4050   85  2900   85   7.4   85   8.3   85  17.2   85  ...  185   85   \n",
       "4   3800   80  2750   80   7.5   80   8.6   80  15.0   80  ...  178   80   \n",
       "5   3680   78  2650   78   7.7   78   8.8   78  13.6   78  ...  175   78   \n",
       "6   3560   76  2550   76   7.9   76   9.0   76  12.2   76  ...  172   76   \n",
       "7   3440   74  2450   74   8.1   74   9.2   74  10.8   74  ...  169   74   \n",
       "8   3320   72  2350   72   8.3   72   9.4   72   9.4   72  ...  166   72   \n",
       "9   3200   70  2250   70   8.5   70   9.6   70   8.0   70  ...  163   70   \n",
       "10  3080   68  2150   68   8.7   68   9.8   68   6.6   68  ...  160   68   \n",
       "11  2960   66  2050   66   8.9   66  10.0   66   5.2   66  ...  157   66   \n",
       "12  2840   64  1950   64   9.1   64  10.2   64   3.8   64  ...  154   64   \n",
       "13  2720   62  1850   62   9.3   62  10.4   62   2.4   62  ...  151   62   \n",
       "14  2600   60  1750   60   9.5   60  10.6   60   1.0   60  ...  148   60   \n",
       "15  2470   50  1710   50   9.7   50  10.8   50   0.0   50  ...  143   50   \n",
       "16  2340   40  1670   40   9.9   40  11.0   40  -1.0   40  ...  138   40   \n",
       "17  2210   30  1630   30  10.1   30  11.2   30  -2.0   30  ...  133   30   \n",
       "18  2080   20  1590   20  10.3   20  11.4   20  -3.0   20  ...  128   20   \n",
       "19  1950   10  1550   10  10.5   10  11.6   10  -4.0   10  ...  123   10   \n",
       "\n",
       "     男引体      女仰卧      男1000米跑      女800米跑       \n",
       "      成绩   分数  成绩   分数      成绩   分数     成绩   分数  \n",
       "0   16.0  100  53  100    3.30  100   3.24  100  \n",
       "1   15.0   95  51   95    3.35   95   3.30   95  \n",
       "2   14.0   90  49   90    3.40   90   3.36   90  \n",
       "3   13.0   85  46   85    3.47   85   3.43   85  \n",
       "4   12.0   80  43   80    3.55   80   3.50   80  \n",
       "5    NaN   78  41   78    4.00   78   3.55   78  \n",
       "6   11.0   76  39   76    4.05   76   4.00   76  \n",
       "7    NaN   74  37   74    4.10   74   4.05   74  \n",
       "8   10.0   72  35   72    4.15   72   4.10   72  \n",
       "9    NaN   70  33   70    4.20   70   4.15   70  \n",
       "10   9.0   68  31   68    4.25   68   4.20   68  \n",
       "11   NaN   66  29   66    4.30   66   4.25   66  \n",
       "12   8.0   64  27   64    4.35   64   4.30   64  \n",
       "13   NaN   62  25   62    4.40   62   4.35   62  \n",
       "14   7.0   60  23   60    4.45   60   4.40   60  \n",
       "15   6.0   50  21   50    5.05   50   4.50   50  \n",
       "16   5.0   40  19   40    5.25   40   5.00   40  \n",
       "17   4.0   30  17   30    5.45   30   5.10   30  \n",
       "18   3.0   20  15   20    6.05   20   5.20   20  \n",
       "19   2.0   10  13   10    6.25   10   5.30   10  \n",
       "\n",
       "[20 rows x 24 columns]"
      ]
     },
     "execution_count": 373,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score_formwork"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 387,
   "id": "56844559",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['女跳远']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "female['跳远分数'] = female['女跳远'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7e95dd41",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 389,
   "id": "da71e0a5",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['女体前屈']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "female['前屈分数'] = female['女体前屈'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 390,
   "id": "46e9e756",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['女仰卧']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "female['仰卧分数'] = female['女仰卧'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 391,
   "id": "10fa5309",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['女肺活量']\n",
    "    exist = (x>=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x>=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "female['肺活分数'] = female['女肺活量'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 392,
   "id": "7570775d",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['女50米跑']\n",
    "    exist = (x<=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x<=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "female['50米分数'] = female['女50米跑'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 393,
   "id": "677cdcd0",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "def convert(x):  \n",
    "    score_index = score_formwork['女800米跑']\n",
    "    exist = (x<=score_index['成绩']).sum()  #True和False，sum表示最终成绩对应的分数索引\n",
    "    if exist>0 and x!=0:   #对于跳远项目为越大分数越高，因此用大于号\n",
    "        grade = score_index['成绩'][ x<=score_index['成绩']].index[0] #index[0]为取内层索引，即为成绩项\n",
    "        return score_index.loc[grade, '分数'] #根据成绩索引取出对应分数\n",
    "    else:\n",
    "        return 0\n",
    "female['800米分数'] = female['女800米跑'].map(convert)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 409,
   "id": "9f9f10df",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"8\" halign=\"left\">50米分数</th>\n",
       "      <th colspan=\"8\" halign=\"left\">1000米跑分数</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>班级</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>33.0</td>\n",
       "      <td>74.484848</td>\n",
       "      <td>14.684433</td>\n",
       "      <td>0.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>78.00</td>\n",
       "      <td>95.0</td>\n",
       "      <td>33.0</td>\n",
       "      <td>71.878788</td>\n",
       "      <td>19.581173</td>\n",
       "      <td>0.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7.0</td>\n",
       "      <td>52.428571</td>\n",
       "      <td>36.395316</td>\n",
       "      <td>0.0</td>\n",
       "      <td>33.0</td>\n",
       "      <td>66.0</td>\n",
       "      <td>75.00</td>\n",
       "      <td>85.0</td>\n",
       "      <td>7.0</td>\n",
       "      <td>47.428571</td>\n",
       "      <td>33.400884</td>\n",
       "      <td>0.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>66.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>76.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>20.0</td>\n",
       "      <td>78.300000</td>\n",
       "      <td>22.349143</td>\n",
       "      <td>0.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>95.00</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20.0</td>\n",
       "      <td>68.700000</td>\n",
       "      <td>25.081132</td>\n",
       "      <td>0.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>90.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>21.0</td>\n",
       "      <td>70.380952</td>\n",
       "      <td>18.861273</td>\n",
       "      <td>0.0</td>\n",
       "      <td>66.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>78.00</td>\n",
       "      <td>100.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>75.380952</td>\n",
       "      <td>22.150567</td>\n",
       "      <td>0.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>24.0</td>\n",
       "      <td>83.041667</td>\n",
       "      <td>11.741710</td>\n",
       "      <td>68.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>96.25</td>\n",
       "      <td>100.0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>80.125000</td>\n",
       "      <td>22.181686</td>\n",
       "      <td>0.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>10.0</td>\n",
       "      <td>73.200000</td>\n",
       "      <td>4.341019</td>\n",
       "      <td>66.0</td>\n",
       "      <td>70.5</td>\n",
       "      <td>73.0</td>\n",
       "      <td>77.50</td>\n",
       "      <td>78.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>68.800000</td>\n",
       "      <td>24.534783</td>\n",
       "      <td>0.0</td>\n",
       "      <td>74.5</td>\n",
       "      <td>77.0</td>\n",
       "      <td>79.5</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>14.0</td>\n",
       "      <td>73.857143</td>\n",
       "      <td>3.278300</td>\n",
       "      <td>68.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>75.50</td>\n",
       "      <td>80.0</td>\n",
       "      <td>14.0</td>\n",
       "      <td>69.428571</td>\n",
       "      <td>20.982463</td>\n",
       "      <td>0.0</td>\n",
       "      <td>69.0</td>\n",
       "      <td>75.0</td>\n",
       "      <td>77.5</td>\n",
       "      <td>90.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>17.0</td>\n",
       "      <td>66.470588</td>\n",
       "      <td>14.327062</td>\n",
       "      <td>30.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>74.00</td>\n",
       "      <td>78.0</td>\n",
       "      <td>17.0</td>\n",
       "      <td>76.294118</td>\n",
       "      <td>7.679231</td>\n",
       "      <td>60.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>90.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>33.0</td>\n",
       "      <td>70.636364</td>\n",
       "      <td>15.003787</td>\n",
       "      <td>0.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>76.00</td>\n",
       "      <td>100.0</td>\n",
       "      <td>33.0</td>\n",
       "      <td>73.545455</td>\n",
       "      <td>19.821218</td>\n",
       "      <td>0.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>29.0</td>\n",
       "      <td>72.551724</td>\n",
       "      <td>7.562059</td>\n",
       "      <td>60.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>74.00</td>\n",
       "      <td>95.0</td>\n",
       "      <td>29.0</td>\n",
       "      <td>73.931034</td>\n",
       "      <td>18.999870</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>41.0</td>\n",
       "      <td>77.560976</td>\n",
       "      <td>8.237259</td>\n",
       "      <td>62.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>80.00</td>\n",
       "      <td>95.0</td>\n",
       "      <td>41.0</td>\n",
       "      <td>76.097561</td>\n",
       "      <td>11.306646</td>\n",
       "      <td>50.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>34.0</td>\n",
       "      <td>68.117647</td>\n",
       "      <td>17.566781</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>74.00</td>\n",
       "      <td>78.0</td>\n",
       "      <td>34.0</td>\n",
       "      <td>63.029412</td>\n",
       "      <td>30.497377</td>\n",
       "      <td>0.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>79.5</td>\n",
       "      <td>90.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>34.0</td>\n",
       "      <td>76.029412</td>\n",
       "      <td>6.561990</td>\n",
       "      <td>64.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>77.50</td>\n",
       "      <td>100.0</td>\n",
       "      <td>34.0</td>\n",
       "      <td>69.529412</td>\n",
       "      <td>15.636467</td>\n",
       "      <td>30.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>90.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>42.0</td>\n",
       "      <td>73.404762</td>\n",
       "      <td>15.199582</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>77.50</td>\n",
       "      <td>100.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>68.952381</td>\n",
       "      <td>18.094538</td>\n",
       "      <td>0.0</td>\n",
       "      <td>66.5</td>\n",
       "      <td>74.0</td>\n",
       "      <td>79.5</td>\n",
       "      <td>85.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>39.0</td>\n",
       "      <td>69.871795</td>\n",
       "      <td>13.673215</td>\n",
       "      <td>0.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>76.00</td>\n",
       "      <td>85.0</td>\n",
       "      <td>39.0</td>\n",
       "      <td>64.564103</td>\n",
       "      <td>19.710797</td>\n",
       "      <td>0.0</td>\n",
       "      <td>55.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>85.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>37.0</td>\n",
       "      <td>72.918919</td>\n",
       "      <td>13.227451</td>\n",
       "      <td>0.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>78.00</td>\n",
       "      <td>90.0</td>\n",
       "      <td>37.0</td>\n",
       "      <td>74.486486</td>\n",
       "      <td>19.756323</td>\n",
       "      <td>0.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>42.0</td>\n",
       "      <td>68.761905</td>\n",
       "      <td>20.553095</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>76.00</td>\n",
       "      <td>95.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>65.261905</td>\n",
       "      <td>22.176740</td>\n",
       "      <td>0.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   50米分数                                                       1000米跑分数  \\\n",
       "   count       mean        std   min   25%   50%    75%    max    count   \n",
       "班级                                                                        \n",
       "1   33.0  74.484848  14.684433   0.0  74.0  76.0  78.00   95.0     33.0   \n",
       "2    7.0  52.428571  36.395316   0.0  33.0  66.0  75.00   85.0      7.0   \n",
       "3   20.0  78.300000  22.349143   0.0  72.0  76.0  95.00  100.0     20.0   \n",
       "4   21.0  70.380952  18.861273   0.0  66.0  74.0  78.00  100.0     21.0   \n",
       "5   24.0  83.041667  11.741710  68.0  74.0  79.0  96.25  100.0     24.0   \n",
       "6   10.0  73.200000   4.341019  66.0  70.5  73.0  77.50   78.0     10.0   \n",
       "7   14.0  73.857143   3.278300  68.0  72.0  73.0  75.50   80.0     14.0   \n",
       "8   17.0  66.470588  14.327062  30.0  68.0  72.0  74.00   78.0     17.0   \n",
       "9   33.0  70.636364  15.003787   0.0  68.0  72.0  76.00  100.0     33.0   \n",
       "10  29.0  72.551724   7.562059  60.0  68.0  70.0  74.00   95.0     29.0   \n",
       "11  41.0  77.560976   8.237259  62.0  74.0  74.0  80.00   95.0     41.0   \n",
       "12  34.0  68.117647  17.566781   0.0  70.0  72.0  74.00   78.0     34.0   \n",
       "13  34.0  76.029412   6.561990  64.0  74.0  76.0  77.50  100.0     34.0   \n",
       "14  42.0  73.404762  15.199582   0.0  70.0  73.0  77.50  100.0     42.0   \n",
       "15  39.0  69.871795  13.673215   0.0  68.0  72.0  76.00   85.0     39.0   \n",
       "16  37.0  72.918919  13.227451   0.0  72.0  74.0  78.00   90.0     37.0   \n",
       "17  42.0  68.761905  20.553095   0.0  70.0  74.0  76.00   95.0     42.0   \n",
       "\n",
       "                                                          \n",
       "         mean        std   min   25%   50%    75%    max  \n",
       "班级                                                        \n",
       "1   71.878788  19.581173   0.0  72.0  76.0   80.0   95.0  \n",
       "2   47.428571  33.400884   0.0  25.0  66.0   70.0   76.0  \n",
       "3   68.700000  25.081132   0.0  73.0  76.0   80.0   90.0  \n",
       "4   75.380952  22.150567   0.0  68.0  76.0   85.0  100.0  \n",
       "5   80.125000  22.181686   0.0  72.0  85.0  100.0  100.0  \n",
       "6   68.800000  24.534783   0.0  74.5  77.0   79.5   80.0  \n",
       "7   69.428571  20.982463   0.0  69.0  75.0   77.5   90.0  \n",
       "8   76.294118   7.679231  60.0  72.0  76.0   80.0   90.0  \n",
       "9   73.545455  19.821218   0.0  68.0  76.0   85.0  100.0  \n",
       "10  73.931034  18.999870   0.0  70.0  72.0   85.0  100.0  \n",
       "11  76.097561  11.306646  50.0  70.0  78.0   80.0  100.0  \n",
       "12  63.029412  30.497377   0.0  68.0  76.0   79.5   90.0  \n",
       "13  69.529412  15.636467  30.0  64.0  74.0   80.0   90.0  \n",
       "14  68.952381  18.094538   0.0  66.5  74.0   79.5   85.0  \n",
       "15  64.564103  19.710797   0.0  55.0  68.0   79.0   85.0  \n",
       "16  74.486486  19.756323   0.0  72.0  78.0   80.0  100.0  \n",
       "17  65.261905  22.176740   0.0  62.0  72.0   78.0  100.0  "
      ]
     },
     "execution_count": 409,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "male.groupby(by='班级')[['50米分数','1000米跑分数']].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ff67ab61",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 418,
   "id": "093e0606",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "female_score = female.iloc[:,-6:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 419,
   "id": "b23fdcad",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "female_score['班级']=female.iloc[:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 433,
   "id": "b655739a",
   "metadata": {
    "hidden": true,
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"8\" halign=\"left\">跳远分数</th>\n",
       "      <th colspan=\"2\" halign=\"left\">前屈分数</th>\n",
       "      <th>...</th>\n",
       "      <th colspan=\"2\" halign=\"left\">50米分数</th>\n",
       "      <th colspan=\"8\" halign=\"left\">800米分数</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>...</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "      <th>count</th>\n",
       "      <th>mean</th>\n",
       "      <th>std</th>\n",
       "      <th>min</th>\n",
       "      <th>25%</th>\n",
       "      <th>50%</th>\n",
       "      <th>75%</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>班级</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>28.0</td>\n",
       "      <td>69.214286</td>\n",
       "      <td>10.788736</td>\n",
       "      <td>40.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>76.5</td>\n",
       "      <td>85.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>77.392857</td>\n",
       "      <td>...</td>\n",
       "      <td>68.5</td>\n",
       "      <td>78.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>78.428571</td>\n",
       "      <td>13.647489</td>\n",
       "      <td>40.0</td>\n",
       "      <td>75.5</td>\n",
       "      <td>80.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>23.0</td>\n",
       "      <td>66.478261</td>\n",
       "      <td>13.023997</td>\n",
       "      <td>40.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>80.956522</td>\n",
       "      <td>...</td>\n",
       "      <td>73.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>23.0</td>\n",
       "      <td>76.869565</td>\n",
       "      <td>19.431241</td>\n",
       "      <td>0.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>45.0</td>\n",
       "      <td>68.177778</td>\n",
       "      <td>8.723763</td>\n",
       "      <td>50.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>45.0</td>\n",
       "      <td>78.088889</td>\n",
       "      <td>...</td>\n",
       "      <td>72.0</td>\n",
       "      <td>95.0</td>\n",
       "      <td>45.0</td>\n",
       "      <td>79.444444</td>\n",
       "      <td>12.209452</td>\n",
       "      <td>30.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>42.0</td>\n",
       "      <td>69.476190</td>\n",
       "      <td>10.854331</td>\n",
       "      <td>30.0</td>\n",
       "      <td>64.5</td>\n",
       "      <td>69.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>90.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>75.833333</td>\n",
       "      <td>...</td>\n",
       "      <td>72.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>75.452381</td>\n",
       "      <td>11.205840</td>\n",
       "      <td>30.0</td>\n",
       "      <td>70.5</td>\n",
       "      <td>77.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>40.0</td>\n",
       "      <td>71.000000</td>\n",
       "      <td>9.519211</td>\n",
       "      <td>60.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>40.0</td>\n",
       "      <td>81.300000</td>\n",
       "      <td>...</td>\n",
       "      <td>66.5</td>\n",
       "      <td>90.0</td>\n",
       "      <td>40.0</td>\n",
       "      <td>67.900000</td>\n",
       "      <td>29.654247</td>\n",
       "      <td>0.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>42.0</td>\n",
       "      <td>62.357143</td>\n",
       "      <td>19.889722</td>\n",
       "      <td>0.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>66.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>90.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>78.690476</td>\n",
       "      <td>...</td>\n",
       "      <td>64.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>42.0</td>\n",
       "      <td>66.928571</td>\n",
       "      <td>26.202209</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.5</td>\n",
       "      <td>76.0</td>\n",
       "      <td>79.5</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>54.0</td>\n",
       "      <td>67.296296</td>\n",
       "      <td>15.860988</td>\n",
       "      <td>0.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>73.5</td>\n",
       "      <td>90.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>73.333333</td>\n",
       "      <td>...</td>\n",
       "      <td>68.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>54.0</td>\n",
       "      <td>75.814815</td>\n",
       "      <td>17.744597</td>\n",
       "      <td>0.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>51.0</td>\n",
       "      <td>65.666667</td>\n",
       "      <td>18.094935</td>\n",
       "      <td>0.0</td>\n",
       "      <td>65.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>51.0</td>\n",
       "      <td>73.529412</td>\n",
       "      <td>...</td>\n",
       "      <td>65.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>51.0</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>25.460558</td>\n",
       "      <td>0.0</td>\n",
       "      <td>75.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>39.0</td>\n",
       "      <td>68.333333</td>\n",
       "      <td>14.772544</td>\n",
       "      <td>0.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>39.0</td>\n",
       "      <td>75.384615</td>\n",
       "      <td>...</td>\n",
       "      <td>67.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>39.0</td>\n",
       "      <td>67.641026</td>\n",
       "      <td>23.673755</td>\n",
       "      <td>0.0</td>\n",
       "      <td>67.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>43.0</td>\n",
       "      <td>69.930233</td>\n",
       "      <td>14.124270</td>\n",
       "      <td>0.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>90.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>79.651163</td>\n",
       "      <td>...</td>\n",
       "      <td>70.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>43.0</td>\n",
       "      <td>78.953488</td>\n",
       "      <td>14.776032</td>\n",
       "      <td>0.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>26.0</td>\n",
       "      <td>67.384615</td>\n",
       "      <td>16.075016</td>\n",
       "      <td>0.0</td>\n",
       "      <td>62.0</td>\n",
       "      <td>67.0</td>\n",
       "      <td>77.5</td>\n",
       "      <td>85.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>79.269231</td>\n",
       "      <td>...</td>\n",
       "      <td>66.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>26.0</td>\n",
       "      <td>64.538462</td>\n",
       "      <td>24.661275</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>73.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>80.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>29.0</td>\n",
       "      <td>62.310345</td>\n",
       "      <td>18.870051</td>\n",
       "      <td>0.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>29.0</td>\n",
       "      <td>71.931034</td>\n",
       "      <td>...</td>\n",
       "      <td>66.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>29.0</td>\n",
       "      <td>70.827586</td>\n",
       "      <td>23.277931</td>\n",
       "      <td>0.0</td>\n",
       "      <td>66.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>28.0</td>\n",
       "      <td>66.178571</td>\n",
       "      <td>20.134830</td>\n",
       "      <td>0.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>75.5</td>\n",
       "      <td>85.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>80.750000</td>\n",
       "      <td>...</td>\n",
       "      <td>68.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>28.0</td>\n",
       "      <td>72.857143</td>\n",
       "      <td>22.824149</td>\n",
       "      <td>0.0</td>\n",
       "      <td>71.5</td>\n",
       "      <td>77.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>25.0</td>\n",
       "      <td>71.240000</td>\n",
       "      <td>15.330471</td>\n",
       "      <td>20.0</td>\n",
       "      <td>64.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>78.480000</td>\n",
       "      <td>...</td>\n",
       "      <td>70.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>78.360000</td>\n",
       "      <td>7.307986</td>\n",
       "      <td>66.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>27.0</td>\n",
       "      <td>71.888889</td>\n",
       "      <td>7.566797</td>\n",
       "      <td>60.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>72.0</td>\n",
       "      <td>79.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>78.000000</td>\n",
       "      <td>...</td>\n",
       "      <td>72.0</td>\n",
       "      <td>85.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>70.074074</td>\n",
       "      <td>22.327847</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>82.5</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>27.0</td>\n",
       "      <td>62.296296</td>\n",
       "      <td>21.595610</td>\n",
       "      <td>0.0</td>\n",
       "      <td>60.0</td>\n",
       "      <td>68.0</td>\n",
       "      <td>77.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>70.222222</td>\n",
       "      <td>...</td>\n",
       "      <td>68.0</td>\n",
       "      <td>78.0</td>\n",
       "      <td>27.0</td>\n",
       "      <td>67.925926</td>\n",
       "      <td>24.243835</td>\n",
       "      <td>0.0</td>\n",
       "      <td>70.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>100.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>24.0</td>\n",
       "      <td>69.083333</td>\n",
       "      <td>9.174239</td>\n",
       "      <td>40.0</td>\n",
       "      <td>66.5</td>\n",
       "      <td>69.0</td>\n",
       "      <td>75.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>76.666667</td>\n",
       "      <td>...</td>\n",
       "      <td>70.0</td>\n",
       "      <td>74.0</td>\n",
       "      <td>24.0</td>\n",
       "      <td>69.333333</td>\n",
       "      <td>24.531553</td>\n",
       "      <td>0.0</td>\n",
       "      <td>69.0</td>\n",
       "      <td>76.0</td>\n",
       "      <td>80.0</td>\n",
       "      <td>95.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>17 rows × 48 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    跳远分数                                                       前屈分数  \\\n",
       "   count       mean        std   min   25%   50%   75%    max count   \n",
       "班级                                                                    \n",
       "1   28.0  69.214286  10.788736  40.0  62.0  68.0  76.5   85.0  28.0   \n",
       "2   23.0  66.478261  13.023997  40.0  60.0  64.0  72.0  100.0  23.0   \n",
       "3   45.0  68.177778   8.723763  50.0  62.0  68.0  72.0  100.0  45.0   \n",
       "4   42.0  69.476190  10.854331  30.0  64.5  69.0  76.0   90.0  42.0   \n",
       "5   40.0  71.000000   9.519211  60.0  64.0  68.0  80.0  100.0  40.0   \n",
       "6   42.0  62.357143  19.889722   0.0  62.0  66.0  72.0   90.0  42.0   \n",
       "7   54.0  67.296296  15.860988   0.0  64.0  68.0  73.5   90.0  54.0   \n",
       "8   51.0  65.666667  18.094935   0.0  65.0  70.0  74.0   85.0  51.0   \n",
       "9   39.0  68.333333  14.772544   0.0  62.0  68.0  73.0  100.0  39.0   \n",
       "10  43.0  69.930233  14.124270   0.0  64.0  68.0  79.0   90.0  43.0   \n",
       "11  26.0  67.384615  16.075016   0.0  62.0  67.0  77.5   85.0  26.0   \n",
       "12  29.0  62.310345  18.870051   0.0  60.0  68.0  70.0   85.0  29.0   \n",
       "13  28.0  66.178571  20.134830   0.0  64.0  70.0  75.5   85.0  28.0   \n",
       "14  25.0  71.240000  15.330471  20.0  64.0  70.0  78.0  100.0  25.0   \n",
       "15  27.0  71.888889   7.566797  60.0  68.0  72.0  79.0   85.0  27.0   \n",
       "16  27.0  62.296296  21.595610   0.0  60.0  68.0  77.0   80.0  27.0   \n",
       "17  24.0  69.083333   9.174239  40.0  66.5  69.0  75.0   80.0  24.0   \n",
       "\n",
       "               ... 50米分数        800米分数                                    \\\n",
       "         mean  ...   75%    max  count       mean        std   min   25%   \n",
       "班级             ...                                                         \n",
       "1   77.392857  ...  68.5   78.0   28.0  78.428571  13.647489  40.0  75.5   \n",
       "2   80.956522  ...  73.0   78.0   23.0  76.869565  19.431241   0.0  72.0   \n",
       "3   78.088889  ...  72.0   95.0   45.0  79.444444  12.209452  30.0  74.0   \n",
       "4   75.833333  ...  72.0  100.0   42.0  75.452381  11.205840  30.0  70.5   \n",
       "5   81.300000  ...  66.5   90.0   40.0  67.900000  29.654247   0.0  68.0   \n",
       "6   78.690476  ...  64.0   74.0   42.0  66.928571  26.202209   0.0  70.5   \n",
       "7   73.333333  ...  68.0   76.0   54.0  75.814815  17.744597   0.0  74.0   \n",
       "8   73.529412  ...  65.0   70.0   51.0  72.000000  25.460558   0.0  75.0   \n",
       "9   75.384615  ...  67.0   80.0   39.0  67.641026  23.673755   0.0  67.0   \n",
       "10  79.651163  ...  70.0   85.0   43.0  78.953488  14.776032   0.0  76.0   \n",
       "11  79.269231  ...  66.0   78.0   26.0  64.538462  24.661275   0.0  70.0   \n",
       "12  71.931034  ...  66.0   72.0   29.0  70.827586  23.277931   0.0  66.0   \n",
       "13  80.750000  ...  68.0   76.0   28.0  72.857143  22.824149   0.0  71.5   \n",
       "14  78.480000  ...  70.0   76.0   25.0  78.360000   7.307986  66.0  74.0   \n",
       "15  78.000000  ...  72.0   85.0   27.0  70.074074  22.327847   0.0  70.0   \n",
       "16  70.222222  ...  68.0   78.0   27.0  67.925926  24.243835   0.0  70.0   \n",
       "17  76.666667  ...  70.0   74.0   24.0  69.333333  24.531553   0.0  69.0   \n",
       "\n",
       "                       \n",
       "     50%   75%    max  \n",
       "班级                     \n",
       "1   80.0  85.0  100.0  \n",
       "2   78.0  85.0  100.0  \n",
       "3   80.0  85.0  100.0  \n",
       "4   77.0  80.0  100.0  \n",
       "5   77.0  85.0  100.0  \n",
       "6   76.0  79.5   95.0  \n",
       "7   78.0  85.0  100.0  \n",
       "8   80.0  85.0   95.0  \n",
       "9   76.0  80.0  100.0  \n",
       "10  80.0  85.0  100.0  \n",
       "11  73.0  80.0   80.0  \n",
       "12  76.0  85.0   95.0  \n",
       "13  77.0  85.0  100.0  \n",
       "14  76.0  85.0   95.0  \n",
       "15  76.0  82.5   95.0  \n",
       "16  76.0  80.0  100.0  \n",
       "17  76.0  80.0   95.0  \n",
       "\n",
       "[17 rows x 48 columns]"
      ]
     },
     "execution_count": 433,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "female_score.groupby(by = '班级').describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 421,
   "id": "c7f7419f",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "#m ={'跳远分数':'tn','前屈分数':'tn','仰卧分数':'tn','肺活分数':'tn','50米分数':'tj','800米分数':'tj'}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 434,
   "id": "7fe834a2",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "#排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 457,
   "id": "12894579",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "female_score['avg'] = female_score.iloc[:,:6].mean(axis=1).round(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 462,
   "id": "fd8f7585",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "female_score = female_score.sort_values(by = ['avg'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 465,
   "id": "cb3d68db",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>跳远分数</th>\n",
       "      <th>前屈分数</th>\n",
       "      <th>仰卧分数</th>\n",
       "      <th>肺活分数</th>\n",
       "      <th>50米分数</th>\n",
       "      <th>800米分数</th>\n",
       "      <th>班级</th>\n",
       "      <th>avg</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>71</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>95</td>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>100</td>\n",
       "      <td>3</td>\n",
       "      <td>94.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>349</td>\n",
       "      <td>100</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>76</td>\n",
       "      <td>9</td>\n",
       "      <td>91.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>174</td>\n",
       "      <td>100</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>85</td>\n",
       "      <td>85</td>\n",
       "      <td>100</td>\n",
       "      <td>5</td>\n",
       "      <td>91.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>110</td>\n",
       "      <td>90</td>\n",
       "      <td>95</td>\n",
       "      <td>78</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>100</td>\n",
       "      <td>4</td>\n",
       "      <td>90.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>66</td>\n",
       "      <td>85</td>\n",
       "      <td>78</td>\n",
       "      <td>85</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>100</td>\n",
       "      <td>3</td>\n",
       "      <td>90.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>588</th>\n",
       "      <td>352</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>589</th>\n",
       "      <td>555</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>16</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>590</th>\n",
       "      <td>489</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>591</th>\n",
       "      <td>454</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>592</th>\n",
       "      <td>229</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>593 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     index  跳远分数  前屈分数  仰卧分数  肺活分数  50米分数  800米分数  班级    avg\n",
       "0       71   100    95    95    85     90     100   3  94.17\n",
       "1      349   100   100    95   100     80      76   9  91.83\n",
       "2      174   100   100    80    85     85     100   5  91.67\n",
       "3      110    90    95    78   100     80     100   4  90.50\n",
       "4       66    85    78    85   100     95     100   3  90.50\n",
       "..     ...   ...   ...   ...   ...    ...     ...  ..    ...\n",
       "588    352     0     0     0     0      0       0   9   0.00\n",
       "589    555     0     0     0     0      0       0  16   0.00\n",
       "590    489     0     0     0     0      0       0  13   0.00\n",
       "591    454     0     0     0     0      0       0  12   0.00\n",
       "592    229     0     0     0     0      0       0   7   0.00\n",
       "\n",
       "[593 rows x 9 columns]"
      ]
     },
     "execution_count": 465,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "female_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 464,
   "id": "6ed86a70",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "female_score.reset_index(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 469,
   "id": "53af6f47",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "male['avg'] =male.iloc[:,-6:].mean(axis=1).round(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 472,
   "id": "8dc128c7",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "male = male.sort_values(by =['avg'],ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 473,
   "id": "6cc7e5c8",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": [
    "male.reset_index(inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 474,
   "id": "d8b16425",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>index</th>\n",
       "      <th>班级</th>\n",
       "      <th>性别</th>\n",
       "      <th>男1000米跑</th>\n",
       "      <th>男50米跑</th>\n",
       "      <th>男跳远</th>\n",
       "      <th>男体前屈</th>\n",
       "      <th>男引体</th>\n",
       "      <th>男肺活量</th>\n",
       "      <th>身高</th>\n",
       "      <th>体重</th>\n",
       "      <th>BMI</th>\n",
       "      <th>50米分数</th>\n",
       "      <th>1000米跑分数</th>\n",
       "      <th>跳远分数</th>\n",
       "      <th>引体分数</th>\n",
       "      <th>肺活量分数</th>\n",
       "      <th>前屈分数</th>\n",
       "      <th>avg</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>285</td>\n",
       "      <td>13</td>\n",
       "      <td>男</td>\n",
       "      <td>3.46</td>\n",
       "      <td>7.04</td>\n",
       "      <td>252.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>5721.0</td>\n",
       "      <td>174.0</td>\n",
       "      <td>64.000000</td>\n",
       "      <td>21.139999</td>\n",
       "      <td>100</td>\n",
       "      <td>85</td>\n",
       "      <td>90</td>\n",
       "      <td>95</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>94.17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>男</td>\n",
       "      <td>3.32</td>\n",
       "      <td>7.20</td>\n",
       "      <td>255.0</td>\n",
       "      <td>22.0</td>\n",
       "      <td>12.0</td>\n",
       "      <td>5324.0</td>\n",
       "      <td>183.0</td>\n",
       "      <td>63.400002</td>\n",
       "      <td>18.930000</td>\n",
       "      <td>95</td>\n",
       "      <td>95</td>\n",
       "      <td>95</td>\n",
       "      <td>80</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>93.33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>56</td>\n",
       "      <td>3</td>\n",
       "      <td>男</td>\n",
       "      <td>3.54</td>\n",
       "      <td>6.91</td>\n",
       "      <td>262.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>4970.0</td>\n",
       "      <td>174.0</td>\n",
       "      <td>79.099998</td>\n",
       "      <td>26.129999</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>100</td>\n",
       "      <td>80</td>\n",
       "      <td>92.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>76</td>\n",
       "      <td>4</td>\n",
       "      <td>男</td>\n",
       "      <td>3.14</td>\n",
       "      <td>6.97</td>\n",
       "      <td>265.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>11.0</td>\n",
       "      <td>4493.0</td>\n",
       "      <td>176.0</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>20.980000</td>\n",
       "      <td>100</td>\n",
       "      <td>100</td>\n",
       "      <td>100</td>\n",
       "      <td>76</td>\n",
       "      <td>95</td>\n",
       "      <td>80</td>\n",
       "      <td>91.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>59</td>\n",
       "      <td>3</td>\n",
       "      <td>男</td>\n",
       "      <td>3.39</td>\n",
       "      <td>7.20</td>\n",
       "      <td>265.0</td>\n",
       "      <td>21.0</td>\n",
       "      <td>15.0</td>\n",
       "      <td>4004.0</td>\n",
       "      <td>187.0</td>\n",
       "      <td>66.300003</td>\n",
       "      <td>18.959999</td>\n",
       "      <td>95</td>\n",
       "      <td>90</td>\n",
       "      <td>100</td>\n",
       "      <td>95</td>\n",
       "      <td>80</td>\n",
       "      <td>90</td>\n",
       "      <td>91.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>472</th>\n",
       "      <td>357</td>\n",
       "      <td>14</td>\n",
       "      <td>男</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>473</th>\n",
       "      <td>272</td>\n",
       "      <td>12</td>\n",
       "      <td>男</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>474</th>\n",
       "      <td>253</td>\n",
       "      <td>12</td>\n",
       "      <td>男</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>475</th>\n",
       "      <td>454</td>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>476</th>\n",
       "      <td>476</td>\n",
       "      <td>17</td>\n",
       "      <td>男</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>477 rows × 19 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     index  班级 性别  男1000米跑  男50米跑    男跳远  男体前屈   男引体    男肺活量     身高  \\\n",
       "0      285  13  男     3.46   7.04  252.0  22.0  15.0  5721.0  174.0   \n",
       "1       17   1  男     3.32   7.20  255.0  22.0  12.0  5324.0  183.0   \n",
       "2       56   3  男     3.54   6.91  262.0  15.0  15.0  4970.0  174.0   \n",
       "3       76   4  男     3.14   6.97  265.0  15.0  11.0  4493.0  176.0   \n",
       "4       59   3  男     3.39   7.20  265.0  21.0  15.0  4004.0  187.0   \n",
       "..     ...  .. ..      ...    ...    ...   ...   ...     ...    ...   \n",
       "472    357  14  男      NaN   0.00    0.0   0.0   0.0     0.0    0.0   \n",
       "473    272  12  男      NaN   0.00    0.0   0.0   0.0     0.0    0.0   \n",
       "474    253  12  男      NaN   0.00    0.0   0.0   0.0     0.0    0.0   \n",
       "475    454  17  男      NaN   0.00    0.0   0.0   0.0     0.0    0.0   \n",
       "476    476  17  男      NaN   0.00    0.0   0.0   0.0     0.0    0.0   \n",
       "\n",
       "            体重        BMI  50米分数  1000米跑分数  跳远分数  引体分数  肺活量分数  前屈分数    avg  \n",
       "0    64.000000  21.139999    100        85    90    95    100    95  94.17  \n",
       "1    63.400002  18.930000     95        95    95    80    100    95  93.33  \n",
       "2    79.099998  26.129999    100        80   100    95    100    80  92.50  \n",
       "3    65.000000  20.980000    100       100   100    76     95    80  91.83  \n",
       "4    66.300003  18.959999     95        90   100    95     80    90  91.67  \n",
       "..         ...        ...    ...       ...   ...   ...    ...   ...    ...  \n",
       "472   0.000000        NaN      0         0     0     0      0     0   0.00  \n",
       "473   0.000000        NaN      0         0     0     0      0     0   0.00  \n",
       "474   0.000000        NaN      0         0     0     0      0     0   0.00  \n",
       "475   0.000000        NaN      0         0     0     0      0     0   0.00  \n",
       "476   0.000000        NaN      0         0     0     0      0     0   0.00  \n",
       "\n",
       "[477 rows x 19 columns]"
      ]
     },
     "execution_count": 474,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "male"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b9850a55",
   "metadata": {
    "hidden": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
